diff options
Diffstat (limited to 'lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp')
-rw-r--r-- | lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp index f44a88c..0a55c0c 100644 --- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp @@ -155,11 +155,9 @@ namespace { ARMConstantPoolValue *ACPV = static_cast<ARMConstantPoolValue*>(MCPV); GlobalValue *GV = ACPV->getGV(); - std::string Name; - if (GV) - Name = Mang->getMangledName(GV); - else - Name = std::string(TAI->getGlobalPrefix()) + ACPV->getSymbol(); + std::string Name = GV ? Mang->getValueName(GV) : TAI->getGlobalPrefix(); + if (!GV) + Name += ACPV->getSymbol(); if (ACPV->isNonLazyPointer()) { if (GV->hasHiddenVisibility()) HiddenGVNonLazyPtrs.insert(Name); @@ -326,7 +324,7 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int OpNum, case MachineOperand::MO_GlobalAddress: { bool isCallOp = Modifier && !strcmp(Modifier, "call"); GlobalValue *GV = MO.getGlobal(); - std::string Name = Mang->getMangledName(GV); + std::string Name = Mang->getValueName(GV); bool isExt = (GV->isDeclaration() || GV->hasWeakLinkage() || GV->hasLinkOnceLinkage()); if (isExt && isCallOp && Subtarget->isTargetDarwin() && @@ -1039,7 +1037,7 @@ void ARMAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { return; } - std::string name = Mang->getMangledName(GVar); + std::string name = Mang->getValueName(GVar); Constant *C = GVar->getInitializer(); if (isa<MDNode>(C) || isa<MDString>(C)) return; |