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

Nate Begeman natebegeman at mac.com
Tue May 2 10:35:04 PDT 2006



Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.165 -> 1.166
---
Log message:

Hooray, everyone now uses the same printBasicBlockLabel implementation


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

 PPCAsmPrinter.cpp |   23 +++--------------------
 1 files changed, 3 insertions(+), 20 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.165 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.166
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.165	Tue May  2 00:37:32 2006
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp	Tue May  2 12:34:51 2006
@@ -233,10 +233,6 @@
       printOperand(MI, OpNo+1);
     }
     
-    virtual void printBasicBlockLabel(const MachineBasicBlock *MBB,
-                                      bool printColon = false,
-                                      bool printComment = true) const;
-    
     virtual bool runOnMachineFunction(MachineFunction &F) = 0;
     virtual bool doFinalization(Module &M) = 0;
     
@@ -507,17 +503,6 @@
   return;
 }
 
-void PPCAsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
-                                         bool printColon,
-                                         bool printComment) const {
-  O << PrivateGlobalPrefix << "BB" << getFunctionNumber() << "_"
-    << MBB->getNumber();
-  if (printColon)
-    O << ':';
-  if (printComment)
-    O << '\t' << CommentString << MBB->getBasicBlock()->getName();
-}
-
 /// runOnMachineFunction - This uses the printMachineInstruction()
 /// method to print assembly for each instruction.
 ///
@@ -729,7 +714,7 @@
   return false; // success
 }
 
-/// runOnMachineFunction - This uses the e()
+/// runOnMachineFunction - This uses the printMachineInstruction()
 /// method to print assembly for each instruction.
 ///
 bool AIXAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
@@ -752,10 +737,8 @@
   // Print out code for the function.
   for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
        I != E; ++I) {
-    // Print a label for the basic block.
-    O << PrivateGlobalPrefix << "BB" << getFunctionNumber() << '_'
-      << I->getNumber()
-      << ":\t" << CommentString << I->getBasicBlock()->getName() << '\n';
+    printBasicBlockLabel(I);
+    O << '\n';
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
       II != E; ++II) {
       // Print the assembly for the instruction.






More information about the llvm-commits mailing list