[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86IntelAsmPrinter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Nov 20 23:44:12 PST 2005
Changes in directory llvm/lib/Target/X86:
X86ATTAsmPrinter.cpp updated: 1.10 -> 1.11
X86IntelAsmPrinter.cpp updated: 1.6 -> 1.7
---
Log message:
Use PrivateGlobalPrefix for basic block labels. This allows the x86 darwin
port to properly use L for the bb prefix instead of .
---
Diffs of the changes: (+9 -5)
X86ATTAsmPrinter.cpp | 8 +++++---
X86IntelAsmPrinter.cpp | 6 ++++--
2 files changed, 9 insertions(+), 5 deletions(-)
Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.10 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.11
--- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.10 Mon Nov 21 01:16:34 2005
+++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Mon Nov 21 01:43:59 2005
@@ -44,8 +44,9 @@
I != E; ++I) {
// Print a label for the basic block.
if (I->pred_begin() != I->pred_end())
- O << ".LBB" << CurrentFnName << "_" << I->getNumber() << ":\t"
- << CommentString << " " << I->getBasicBlock()->getName() << "\n";
+ O << PrivateGlobalPrefix << "BB" << CurrentFnName << "_" << 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.
@@ -78,7 +79,8 @@
return;
case MachineOperand::MO_MachineBasicBlock: {
MachineBasicBlock *MBBOp = MO.getMachineBasicBlock();
- O << ".LBB" << Mang->getValueName(MBBOp->getParent()->getFunction())
+ O << PrivateGlobalPrefix << "BB"
+ << Mang->getValueName(MBBOp->getParent()->getFunction())
<< "_" << MBBOp->getNumber () << "\t# "
<< MBBOp->getBasicBlock ()->getName ();
return;
Index: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.6 llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.7
--- llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.6 Mon Nov 21 01:16:34 2005
+++ llvm/lib/Target/X86/X86IntelAsmPrinter.cpp Mon Nov 21 01:43:59 2005
@@ -44,7 +44,8 @@
I != E; ++I) {
// Print a label for the basic block if there are any predecessors.
if (I->pred_begin() != I->pred_end())
- O << ".LBB" << CurrentFnName << "_" << I->getNumber() << ":\t"
+ O << PrivateGlobalPrefix << "BB" << CurrentFnName << "_" << I->getNumber()
+ << ":\t"
<< CommentString << " " << I->getBasicBlock()->getName() << "\n";
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
@@ -98,7 +99,8 @@
return;
case MachineOperand::MO_MachineBasicBlock: {
MachineBasicBlock *MBBOp = MO.getMachineBasicBlock();
- O << ".LBB" << Mang->getValueName(MBBOp->getParent()->getFunction())
+ O << PrivateGlobalPrefix << "BB"
+ << Mang->getValueName(MBBOp->getParent()->getFunction())
<< "_" << MBBOp->getNumber () << "\t# "
<< MBBOp->getBasicBlock ()->getName ();
return;
More information about the llvm-commits
mailing list