mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
simplify code, reducing string thrashing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e4d9ea83c0
commit
b8f64a72d8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user