diff options
author | Dan Gohman <gohman@apple.com> | 2007-10-12 14:53:36 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-10-12 14:53:36 +0000 |
commit | 8ddde0a151c5297ae5694a4b9201b2d3fe56b196 (patch) | |
tree | 2a34eb07eec2cc08392f9b32c6115299394eeaa0 /lib/Target/PowerPC/PPCAsmPrinter.cpp | |
parent | a9b511187b5450ec2e241f45b640358bfdc9c42c (diff) | |
download | external_llvm-8ddde0a151c5297ae5694a4b9201b2d3fe56b196.zip external_llvm-8ddde0a151c5297ae5694a4b9201b2d3fe56b196.tar.gz external_llvm-8ddde0a151c5297ae5694a4b9201b2d3fe56b196.tar.bz2 |
Change the names used for internal labels to use the current
function symbol name instead of a codegen-assigned function
number.
Thanks Evan! :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42908 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCAsmPrinter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 9ff41ca..a75136b 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -164,7 +164,7 @@ namespace { O << "lo16("; printOp(MI->getOperand(OpNo)); if (TM.getRelocationModel() == Reloc::PIC_) - O << "-\"L" << getFunctionNumber() << "$pb\")"; + O << "-\"L" "pb$" << CurrentFnName << "\")"; else O << ')'; } @@ -208,8 +208,8 @@ namespace { O << (int)MI->getOperand(OpNo).getImmedValue()*4; } void printPICLabel(const MachineInstr *MI, unsigned OpNo) { - O << "\"L" << getFunctionNumber() << "$pb\"\n"; - O << "\"L" << getFunctionNumber() << "$pb\":"; + O << "\"L" "pb$" << CurrentFnName << "\"\n"; + O << "\"L" "pb$" << CurrentFnName << "\":"; } void printSymbolHi(const MachineInstr *MI, unsigned OpNo) { if (MI->getOperand(OpNo).isImmediate()) { @@ -218,7 +218,7 @@ namespace { if (Subtarget.isDarwin()) O << "ha16("; printOp(MI->getOperand(OpNo)); if (TM.getRelocationModel() == Reloc::PIC_) - O << "-\"L" << getFunctionNumber() << "$pb\""; + O << "-\"L" "pb$" << CurrentFnName << "\""; if (Subtarget.isDarwin()) O << ')'; else @@ -232,7 +232,7 @@ namespace { if (Subtarget.isDarwin()) O << "lo16("; printOp(MI->getOperand(OpNo)); if (TM.getRelocationModel() == Reloc::PIC_) - O << "-\"L" << getFunctionNumber() << "$pb\""; + O << "-\"L" "pb$" << CurrentFnName << "\""; if (Subtarget.isDarwin()) O << ')'; else @@ -362,13 +362,13 @@ void PPCAsmPrinter::printOp(const MachineOperand &MO) { printBasicBlockLabel(MO.getMachineBasicBlock()); return; case MachineOperand::MO_JumpTableIndex: - O << TAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() - << '_' << MO.getJumpTableIndex(); + O << TAI->getPrivateGlobalPrefix() << "JTI" << MO.getJumpTableIndex() + << '_' << CurrentFnName; // FIXME: PIC relocation model return; case MachineOperand::MO_ConstantPoolIndex: - O << TAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber() - << '_' << MO.getConstantPoolIndex(); + O << TAI->getPrivateGlobalPrefix() << "CPI" << MO.getConstantPoolIndex() + << '_' << CurrentFnName; return; case MachineOperand::MO_ExternalSymbol: // Computing the address of an external symbol, not calling it. |