[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Nov 21 00:02:53 PST 2005



Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.118 -> 1.119
---
Log message:

Use CommentString where possible, fix a bug where aix mode wouldn't assemble
due to basic blocks being misnamed.


---
Diffs of the changes:  (+4 -4)

 PPCAsmPrinter.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.118 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.119
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.118	Mon Nov 21 01:57:37 2005
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp	Mon Nov 21 02:02:41 2005
@@ -590,7 +590,7 @@
 /// method to print assembly for each instruction.
 ///
 bool AIXAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
-  CurrentFnName = MF.getFunction()->getName();
+  SetupMachineFunction(MF);
 
   // Print out constants referenced by the function
   printConstantPool(MF.getConstantPool());
@@ -610,8 +610,8 @@
   for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
        I != E; ++I) {
     // Print a label for the basic block.
-    O << PrivateGlobalPrefix << "BB" << CurrentFnName << '_' << I->getNumber()
-      << ":\t# " << I->getBasicBlock()->getName() << '\n';
+    O << PrivateGlobalPrefix << "BB" << FunctionNumber << '_' << I->getNumber()
+      << ":\t" << CommentString << I->getBasicBlock()->getName() << '\n';
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
       II != E; ++II) {
       // Print the assembly for the instruction.
@@ -697,7 +697,7 @@
       O << "\t.comm " << Name << "," << TD.getTypeSize(I->getType())
         << "," << Log2_32((unsigned)TD.getTypeAlignment(I->getType()));
     }
-    O << "\t\t# ";
+    O << "\t\t" << CommentString << " ";
     WriteAsOperand(O, I, false, true, &M);
     O << "\n";
   }






More information about the llvm-commits mailing list