[llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp

Reid Spencer reid at x10sys.com
Fri Jan 26 00:10:42 PST 2007



Changes in directory llvm/lib/Bytecode/Writer:

Writer.cpp updated: 1.152 -> 1.153
---
Log message:

For PR761: http://llvm.org/PR761 :
Remove the Endianness and PointerSize fields from the ModuleHeader and
replace it with the DataLayout field.


---
Diffs of the changes:  (+5 -11)

 Writer.cpp |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)


Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.152 llvm/lib/Bytecode/Writer/Writer.cpp:1.153
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.152	Thu Jan 18 18:07:16 2007
+++ llvm/lib/Bytecode/Writer/Writer.cpp	Fri Jan 26 02:10:24 2007
@@ -813,17 +813,8 @@
   // 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 @@
 
   // 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());






More information about the llvm-commits mailing list