Don't print llvm constant in assmebly file. Assembler won't like comments that
authorEvan Cheng <evan.cheng@apple.com>
Wed, 1 Mar 2006 22:18:09 +0000 (22:18 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 1 Mar 2006 22:18:09 +0000 (22:18 +0000)
span multiple lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26463 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter.cpp

index 92a2d7ba8dc4529ded06fe1dbbc53c1eb6e14b5b..ea959b516f74adf9ce275762a4addc0310399b41 100644 (file)
@@ -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 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) {
   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());