aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2006-05-02 17:34:51 +0000
committerNate Begeman <natebegeman@mac.com>2006-05-02 17:34:51 +0000
commit6e0f3868965612fbd391ec9d4c5eeec6ffebb351 (patch)
tree2e256c5a5f44241a98724a43e81d6aae28b73721 /lib
parentb0cc79d45b1e455b486f8ca5cc68546b7a865eb3 (diff)
downloadexternal_llvm-6e0f3868965612fbd391ec9d4c5eeec6ffebb351.tar.gz
external_llvm-6e0f3868965612fbd391ec9d4c5eeec6ffebb351.tar.bz2
external_llvm-6e0f3868965612fbd391ec9d4c5eeec6ffebb351.zip
Hooray, everyone now uses the same printBasicBlockLabel implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp23
-rw-r--r--lib/Target/X86/X86AsmPrinter.cpp12
-rwxr-xr-xlib/Target/X86/X86AsmPrinter.h4
3 files changed, 3 insertions, 36 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index d32b3231fa..f3a03114b2 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -233,10 +233,6 @@ namespace {
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 @@ void PPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
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 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
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 @@ bool AIXAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// 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.
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp
index 2c41663d9d..f12ba51f1f 100644
--- a/lib/Target/X86/X86AsmPrinter.cpp
+++ b/lib/Target/X86/X86AsmPrinter.cpp
@@ -206,18 +206,6 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
return false; // success
}
-void X86SharedAsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
- bool printColon,
- bool printComment) const {
- O << PrivateGlobalPrefix << "BB"
- << Mang->getValueName(MBB->getParent()->getFunction()) << "_"
- << MBB->getNumber();
- if (printColon)
- O << ':';
- if (printComment)
- O << '\t' << CommentString << MBB->getBasicBlock()->getName();
-}
-
/// createX86CodePrinterPass - Returns a pass that prints the X86 assembly code
/// for a MachineFunction to the given output stream, using the given target
/// machine description.
diff --git a/lib/Target/X86/X86AsmPrinter.h b/lib/Target/X86/X86AsmPrinter.h
index 2d341d928b..c4d67b6ac7 100755
--- a/lib/Target/X86/X86AsmPrinter.h
+++ b/lib/Target/X86/X86AsmPrinter.h
@@ -88,10 +88,6 @@ struct X86SharedAsmPrinter : public AsmPrinter {
MI->getOperand(Op+3).isGlobalAddress() ||
MI->getOperand(Op+3).isConstantPoolIndex());
}
-
- virtual void printBasicBlockLabel(const MachineBasicBlock *MBB,
- bool printColon = false,
- bool printComment = true) const;
};
} // end namespace llvm