[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 20 22:52:04 PST 2005



Changes in directory llvm/lib/Target/Alpha:

AlphaAsmPrinter.cpp updated: 1.20 -> 1.21
---
Log message:

Start using PrivateGlobalPrefix correctly


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

 AlphaAsmPrinter.cpp |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.20 llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.21
--- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.20	Thu Sep 29 17:54:56 2005
+++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp	Mon Nov 21 00:51:52 2005
@@ -43,6 +43,7 @@
        : AsmPrinter(o, tm), LabelNumber(0)
     {
       AlignmentIsInBytes = false;
+      PrivateGlobalPrefix = "$";
     }
 
     /// We name each basic block in a Function with a unique number, so
@@ -131,7 +132,8 @@
   }
 
   case MachineOperand::MO_ConstantPoolIndex:
-    O << "$CPI" << CurrentFnName << "_" << MO.getConstantPoolIndex();
+    O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_"
+      << MO.getConstantPoolIndex();
     return;
 
   case MachineOperand::MO_ExternalSymbol:
@@ -222,8 +224,8 @@
   for (unsigned i = 0, e = CP.size(); i != e; ++i) {
     //    SwitchSection(O, "section .rodata, \"dr\"");
     emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
-    O << "$CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t" << CommentString
-      << *CP[i] << "\n";
+    O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_" << i 
+      << ":\t\t\t\t\t" << CommentString << *CP[i] << "\n";
     emitGlobalConstant(CP[i]);
   }
 }






More information about the llvm-commits mailing list