[llvm-commits] CVS: llvm/lib/Target/X86/Printer.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Thu Jul 31 12:40:01 PDT 2003


Changes in directory llvm/lib/Target/X86:

Printer.cpp updated: 1.50 -> 1.51

---
Log message:

I think local symbols in X86 GAS have to start with .L, not just
.; so I have changed the basic block markers to start with .L.  I also
broke up a >80char line.


---
Diffs of the changes:

Index: llvm/lib/Target/X86/Printer.cpp
diff -u llvm/lib/Target/X86/Printer.cpp:1.50 llvm/lib/Target/X86/Printer.cpp:1.51
--- llvm/lib/Target/X86/Printer.cpp:1.50	Thu Jul 24 15:20:44 2003
+++ llvm/lib/Target/X86/Printer.cpp	Thu Jul 31 12:38:52 2003
@@ -431,7 +431,7 @@
   for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
        I != E; ++I) {
     // Print a label for the basic block.
-    O << ".BB" << NumberForBB[I->getBasicBlock()] << ":\t# "
+    O << ".LBB" << NumberForBB[I->getBasicBlock()] << ":\t# "
       << I->getBasicBlock()->getName() << "\n";
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
 	 II != E; ++II) {
@@ -485,11 +485,13 @@
       ValueMapTy::const_iterator i = NumberForBB.find(MO.getVRegValue());
       assert (i != NumberForBB.end()
 	      && "Could not find a BB I previously put in the NumberForBB map!");
-      O << ".BB" << i->second << " # PC rel: " << MO.getVRegValue()->getName();
+      O << ".LBB" << i->second << " # PC rel: " << MO.getVRegValue()->getName();
     }
     return;
   case MachineOperand::MO_GlobalAddress:
-    if (!elideOffsetKeyword) O << "OFFSET "; O << Mang->getValueName(MO.getGlobal());
+    if (!elideOffsetKeyword)
+      O << "OFFSET ";
+    O << Mang->getValueName(MO.getGlobal());
     return;
   case MachineOperand::MO_ExternalSymbol:
     O << MO.getSymbolName();





More information about the llvm-commits mailing list