aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-21 08:02:41 +0000
committerChris Lattner <sabre@nondot.org>2005-11-21 08:02:41 +0000
commit6d5a4f6a8ed7347bbe4880ac3f3bb87d62836e01 (patch)
treea04c046baa73b875e2cc5eb1ea864dd0fe5b0dde /lib/Target/PowerPC/PPCAsmPrinter.cpp
parentef658741519db6e7091329c3fe57a771f67c237a (diff)
Use CommentString where possible, fix a bug where aix mode wouldn't assemble
due to basic blocks being misnamed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24459 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 723fa5a65b..aeb3214a0a 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -590,7 +590,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
/// 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 @@ bool AIXAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
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 @@ bool AIXAsmPrinter::doFinalization(Module &M) {
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";
}