diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 08:10:24 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 08:10:24 +0000 |
commit | 675fb2301fa8b77e8d6d0b84be7a5799d1ab9b01 (patch) | |
tree | 316d703942646f812a9c646aa4cb7d1c8bd19485 /llvm/lib/Bytecode/Writer/Writer.cpp | |
parent | 6a8d4eab6a3cd3f2c2989f27e9a8e6ca94859b3a (diff) | |
download | bcm5719-llvm-675fb2301fa8b77e8d6d0b84be7a5799d1ab9b01.tar.gz bcm5719-llvm-675fb2301fa8b77e8d6d0b84be7a5799d1ab9b01.zip |
For PR761:
Remove the Endianness and PointerSize fields from the ModuleHeader and
replace it with the DataLayout field.
llvm-svn: 33529
Diffstat (limited to 'llvm/lib/Bytecode/Writer/Writer.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Writer/Writer.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp index 20135249390..d5f3f9301d5 100644 --- a/llvm/lib/Bytecode/Writer/Writer.cpp +++ b/llvm/lib/Bytecode/Writer/Writer.cpp @@ -813,17 +813,8 @@ BytecodeWriter::BytecodeWriter(std::vector<unsigned char> &o, const Module *M) // Emit the top level CLASS block. BytecodeBlock ModuleBlock(BytecodeFormat::ModuleBlockID, *this, false, true); - bool isBigEndian = M->getEndianness() == Module::BigEndian; - bool hasLongPointers = M->getPointerSize() == Module::Pointer64; - bool hasNoEndianness = M->getEndianness() == Module::AnyEndianness; - bool hasNoPointerSize = M->getPointerSize() == Module::AnyPointerSize; - - // Output the version identifier and other information. - unsigned Version = (BCVersionNum << 4) | - (unsigned)isBigEndian | (hasLongPointers << 1) | - (hasNoEndianness << 2) | - (hasNoPointerSize << 3); - output_vbr(Version); + // Output the version identifier + output_vbr(BCVersionNum); // The Global type plane comes first { @@ -1090,6 +1081,9 @@ void BytecodeWriter::outputModuleInfoBlock(const Module *M) { // Output the target triple from the module output(M->getTargetTriple()); + + // Output the data layout from the module + output(M->getDataLayout()); // Emit the table of section names. output_vbr((unsigned)SectionNames.size()); |