diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-05-04 21:09:02 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-05-04 21:09:02 +0000 |
commit | 7e4375365e57f4f4e01253a77c00b2753e0fa42d (patch) | |
tree | 5a101d5f6c069b9344c5dbe62a5238a9970378bf /lib | |
parent | d11577b68b442217153ecbcc93b978a5a700a8ed (diff) | |
download | external_llvm-7e4375365e57f4f4e01253a77c00b2753e0fa42d.zip external_llvm-7e4375365e57f4f4e01253a77c00b2753e0fa42d.tar.gz external_llvm-7e4375365e57f4f4e01253a77c00b2753e0fa42d.tar.bz2 |
Correctly mangle function names when they are used as part of a
constant pool member's name.
This is intended to address Bug 333.
Also, fix an anachronistic usage of "M" as a parameter of type Function *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/SparcV9/SparcV9AsmPrinter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp index 0f8c2cd..cf24c3a 100644 --- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp +++ b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp @@ -651,7 +651,7 @@ SparcV9AsmPrinter::printOneOperand(const MachineOperand &mop, case MachineOperand::MO_ConstantPoolIndex: { - toAsm << ".CPI_" << currFunction->getName() + toAsm << ".CPI_" << getID(currFunction) << "_" << mop.getConstantPoolIndex(); break; } @@ -663,8 +663,8 @@ SparcV9AsmPrinter::printOneOperand(const MachineOperand &mop, if (const BasicBlock *BB = dyn_cast<BasicBlock>(Val)) toAsm << getID(BB); - else if (const Function *M = dyn_cast<Function>(Val)) - toAsm << getID(M); + else if (const Function *F = dyn_cast<Function>(Val)) + toAsm << getID(F); else if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(Val)) toAsm << getID(GV); else if (const Constant *CV = dyn_cast<Constant>(Val)) |