For PR761:

Remove the Endianness and PointerSize fields from the ModuleHeader and
replace it with the DataLayout field.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33529 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2007-01-26 08:10:24 +00:00
parent 4de76f4884
commit aacc35a794
3 changed files with 16 additions and 36 deletions

View File

@@ -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());