aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Writer/Writer.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-26 08:10:24 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-26 08:10:24 +0000
commitaacc35a7943da43c233378b29f83b3382ff58904 (patch)
tree018defcfe7e8e1c2922e211d583def9842731d11 /lib/Bytecode/Writer/Writer.cpp
parent4de76f4884731aa3333c498b1ab4349cf4b7e29a (diff)
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
Diffstat (limited to 'lib/Bytecode/Writer/Writer.cpp')
-rw-r--r--lib/Bytecode/Writer/Writer.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 2013524939..d5f3f9301d 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/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());