[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp

Owen Anderson resistor at mac.com
Tue Oct 17 19:21:27 PDT 2006



Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.207 -> 1.208
---
Log message:

Add support for the new "target data" information in .ll files.  This provides 
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.


---
Diffs of the changes:  (+3 -0)

 AsmWriter.cpp |    3 +++
 1 files changed, 3 insertions(+)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.207 llvm/lib/VMCore/AsmWriter.cpp:1.208
--- llvm/lib/VMCore/AsmWriter.cpp:1.207	Thu Sep 28 17:50:29 2006
+++ llvm/lib/VMCore/AsmWriter.cpp	Tue Oct 17 21:21:12 2006
@@ -781,6 +781,9 @@
       M->getModuleIdentifier().find('\n') == std::string::npos)
     Out << "; ModuleID = '" << M->getModuleIdentifier() << "'\n";
 
+  if (!M->getDataLayout().empty())
+    Out << "target data = \"" << M->getDataLayout() << "\"\n";
+
   switch (M->getEndianness()) {
   case Module::LittleEndian: Out << "target endian = little\n"; break;
   case Module::BigEndian:    Out << "target endian = big\n";    break;






More information about the llvm-commits mailing list