[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp

Evan Cheng evan.cheng at apple.com
Wed Mar 1 14:18:21 PST 2006



Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.55 -> 1.56
---
Log message:

Don't print llvm constant in assmebly file. Assembler won't like comments that
span multiple lines.


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

 AsmPrinter.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.55 llvm/lib/CodeGen/AsmPrinter.cpp:1.56
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.55	Fri Feb 24 14:21:58 2006
+++ llvm/lib/CodeGen/AsmPrinter.cpp	Wed Mar  1 16:18:09 2006
@@ -11,6 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "llvm/Assembly/Writer.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/CodeGen/AsmPrinter.h"
 #include "llvm/Constants.h"
@@ -114,7 +115,8 @@
   EmitAlignment(MCP->getConstantPoolAlignment());
   for (unsigned i = 0, e = CP.size(); i != e; ++i) {
     O << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << '_' << i
-      << ":\t\t\t\t\t" << CommentString << *CP[i].Val << '\n';
+      << ":\t\t\t\t\t" << CommentString << " ";
+    WriteTypeSymbolic(O, CP[i].Val->getType(), 0) << '\n';
     EmitGlobalConstant(CP[i].Val);
     if (i != e-1) {
       unsigned EntSize = TM.getTargetData().getTypeSize(CP[i].Val->getType());






More information about the llvm-commits mailing list