aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp30
1 files changed, 10 insertions, 20 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index 32a8f5e..6d4a05f 100644
--- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -157,26 +157,16 @@ namespace {
// FIXME: Remove this when Darwin transition to @GOT like syntax.
Name = Mang->getMangledName(GV, "$non_lazy_ptr", true);
MCSymbol *Sym = OutContext.GetOrCreateSymbol(Name.c_str());
-
- if (GV->hasHiddenVisibility()) {
- const MCSymbol *&StubSym =
- MMI->getObjFileInfo<MachineModuleInfoMachO>()
- .getHiddenGVStubEntry(Sym);
- if (StubSym == 0) {
- //NameStr.clear();
- //Mang->getNameWithPrefix(NameStr, GV, false);
- std::string SymName = Mang->getMangledName(GV);
- StubSym = OutContext.GetOrCreateSymbol(SymName.c_str());
- }
- } else {
- const MCSymbol *&StubSym =
- MMI->getObjFileInfo<MachineModuleInfoMachO>().getGVStubEntry(Sym);
- if (StubSym == 0) {
- //NameStr.clear();
- //Mang->getNameWithPrefix(NameStr, GV, false);
- std::string SymName = Mang->getMangledName(GV);
- StubSym = OutContext.GetOrCreateSymbol(SymName.c_str());
- }
+
+ MachineModuleInfoMachO &MMIMachO =
+ MMI->getObjFileInfo<MachineModuleInfoMachO>();
+ const MCSymbol *&StubSym =
+ GV->hasHiddenVisibility() ? MMIMachO.getHiddenGVStubEntry(Sym) :
+ MMIMachO.getGVStubEntry(Sym);
+ if (StubSym == 0) {
+ SmallString<128> NameStr;
+ Mang->getNameWithPrefix(NameStr, GV, false);
+ StubSym = OutContext.GetOrCreateSymbol(NameStr.str());
}
}
} else