From: Chris Lattner Date: Mon, 21 Nov 2005 08:02:41 +0000 (+0000) Subject: Use CommentString where possible, fix a bug where aix mode wouldn't assemble X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6d5a4f6a8ed7347bbe4880ac3f3bb87d62836e01;p=oota-llvm.git 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 --- diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 723fa5a65be..aeb3214a0a4 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"; }