mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-22 03:31:06 +00:00
Code Custodian:
- Widespread trailing space removal - A dash of OCD spacing to block align enums - joined a line that probably needed 80 cols a while back git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168566 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f4f14f68f6
commit
170a15e98d
@ -50,10 +50,10 @@ class ArchiveMember : public ilist_node<ArchiveMember> {
|
||||
SVR4SymbolTableFlag = 1, ///< Member is a SVR4 symbol table
|
||||
BSD4SymbolTableFlag = 2, ///< Member is a BSD4 symbol table
|
||||
LLVMSymbolTableFlag = 4, ///< Member is an LLVM symbol table
|
||||
BitcodeFlag = 8, ///< Member is bitcode
|
||||
HasPathFlag = 16, ///< Member has a full or partial path
|
||||
BitcodeFlag = 8, ///< Member is bitcode
|
||||
HasPathFlag = 16, ///< Member has a full or partial path
|
||||
HasLongFilenameFlag = 32, ///< Member uses the long filename syntax
|
||||
StringTableFlag = 64 ///< Member is an ar(1) format string table
|
||||
StringTableFlag = 64 ///< Member is an ar(1) format string table
|
||||
};
|
||||
|
||||
/// @}
|
||||
|
@ -26,8 +26,8 @@
|
||||
namespace llvm {
|
||||
namespace bitc {
|
||||
enum StandardWidths {
|
||||
BlockIDWidth = 8, // We use VBR-8 for block IDs.
|
||||
CodeLenWidth = 4, // Codelen are VBR-4.
|
||||
BlockIDWidth = 8, // We use VBR-8 for block IDs.
|
||||
CodeLenWidth = 4, // Codelen are VBR-4.
|
||||
BlockSizeWidth = 32 // BlockSize up to 2^32 32-bit words = 16GB per block.
|
||||
};
|
||||
|
||||
@ -70,9 +70,10 @@ namespace bitc {
|
||||
// DEFINE_ABBREV has magic semantics here, applying to the current SETBID'd
|
||||
// block, instead of the BlockInfo block.
|
||||
|
||||
BLOCKINFO_CODE_SETBID = 1, // SETBID: [blockid#]
|
||||
BLOCKINFO_CODE_BLOCKNAME = 2, // BLOCKNAME: [name]
|
||||
BLOCKINFO_CODE_SETRECORDNAME = 3 // BLOCKINFO_CODE_SETRECORDNAME: [id, name]
|
||||
BLOCKINFO_CODE_SETBID = 1, // SETBID: [blockid#]
|
||||
BLOCKINFO_CODE_BLOCKNAME = 2, // BLOCKNAME: [name]
|
||||
BLOCKINFO_CODE_SETRECORDNAME = 3 // BLOCKINFO_CODE_SETRECORDNAME:
|
||||
// [id, name]
|
||||
};
|
||||
|
||||
} // End bitc namespace
|
||||
@ -99,7 +100,7 @@ public:
|
||||
explicit BitCodeAbbrevOp(Encoding E, uint64_t Data = 0)
|
||||
: Val(Data), IsLiteral(false), Enc(E) {}
|
||||
|
||||
bool isLiteral() const { return IsLiteral; }
|
||||
bool isLiteral() const { return IsLiteral; }
|
||||
bool isEncoding() const { return !IsLiteral; }
|
||||
|
||||
// Accessors for literals.
|
||||
@ -138,18 +139,18 @@ public:
|
||||
if (C >= 'a' && C <= 'z') return C-'a';
|
||||
if (C >= 'A' && C <= 'Z') return C-'A'+26;
|
||||
if (C >= '0' && C <= '9') return C-'0'+26+26;
|
||||
if (C == '.') return 62;
|
||||
if (C == '_') return 63;
|
||||
if (C == '.') return 62;
|
||||
if (C == '_') return 63;
|
||||
llvm_unreachable("Not a value Char6 character!");
|
||||
}
|
||||
|
||||
static char DecodeChar6(unsigned V) {
|
||||
assert((V & ~63) == 0 && "Not a Char6 encoded character!");
|
||||
if (V < 26) return V+'a';
|
||||
if (V < 26+26) return V-26+'A';
|
||||
if (V < 26) return V+'a';
|
||||
if (V < 26+26) return V-26+'A';
|
||||
if (V < 26+26+10) return V-26-26+'0';
|
||||
if (V == 62) return '.';
|
||||
if (V == 63) return '_';
|
||||
if (V == 62) return '.';
|
||||
if (V == 63) return '_';
|
||||
llvm_unreachable("Not a value Char6 character!");
|
||||
}
|
||||
|
||||
|
@ -17,8 +17,7 @@ using namespace llvm;
|
||||
|
||||
int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) {
|
||||
std::string ErrorInfo;
|
||||
raw_fd_ostream OS(Path, ErrorInfo,
|
||||
raw_fd_ostream::F_Binary);
|
||||
raw_fd_ostream OS(Path, ErrorInfo, raw_fd_ostream::F_Binary);
|
||||
|
||||
if (!ErrorInfo.empty())
|
||||
return -1;
|
||||
|
@ -256,16 +256,16 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) {
|
||||
|
||||
switch (T->getTypeID()) {
|
||||
default: llvm_unreachable("Unknown type!");
|
||||
case Type::VoidTyID: Code = bitc::TYPE_CODE_VOID; break;
|
||||
case Type::HalfTyID: Code = bitc::TYPE_CODE_HALF; break;
|
||||
case Type::FloatTyID: Code = bitc::TYPE_CODE_FLOAT; break;
|
||||
case Type::DoubleTyID: Code = bitc::TYPE_CODE_DOUBLE; break;
|
||||
case Type::X86_FP80TyID: Code = bitc::TYPE_CODE_X86_FP80; break;
|
||||
case Type::FP128TyID: Code = bitc::TYPE_CODE_FP128; break;
|
||||
case Type::VoidTyID: Code = bitc::TYPE_CODE_VOID; break;
|
||||
case Type::HalfTyID: Code = bitc::TYPE_CODE_HALF; break;
|
||||
case Type::FloatTyID: Code = bitc::TYPE_CODE_FLOAT; break;
|
||||
case Type::DoubleTyID: Code = bitc::TYPE_CODE_DOUBLE; break;
|
||||
case Type::X86_FP80TyID: Code = bitc::TYPE_CODE_X86_FP80; break;
|
||||
case Type::FP128TyID: Code = bitc::TYPE_CODE_FP128; break;
|
||||
case Type::PPC_FP128TyID: Code = bitc::TYPE_CODE_PPC_FP128; break;
|
||||
case Type::LabelTyID: Code = bitc::TYPE_CODE_LABEL; break;
|
||||
case Type::MetadataTyID: Code = bitc::TYPE_CODE_METADATA; break;
|
||||
case Type::X86_MMXTyID: Code = bitc::TYPE_CODE_X86_MMX; break;
|
||||
case Type::LabelTyID: Code = bitc::TYPE_CODE_LABEL; break;
|
||||
case Type::MetadataTyID: Code = bitc::TYPE_CODE_METADATA; break;
|
||||
case Type::X86_MMXTyID: Code = bitc::TYPE_CODE_X86_MMX; break;
|
||||
case Type::IntegerTyID:
|
||||
// INTEGER: [width]
|
||||
Code = bitc::TYPE_CODE_INTEGER;
|
||||
|
Loading…
x
Reference in New Issue
Block a user