mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
PPC: Simplify code with Twines.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168539 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b315772cc9
commit
8f2dce0cda
@ -549,16 +549,13 @@ void PPCDarwinAsmPrinter::EmitStartOfAsmFile(Module &M) {
|
||||
|
||||
static MCSymbol *GetLazyPtr(MCSymbol *Sym, MCContext &Ctx) {
|
||||
// Remove $stub suffix, add $lazy_ptr.
|
||||
SmallString<128> TmpStr(Sym->getName().begin(), Sym->getName().end()-5);
|
||||
TmpStr += "$lazy_ptr";
|
||||
return Ctx.GetOrCreateSymbol(TmpStr.str());
|
||||
StringRef NoStub = Sym->getName().substr(0, Sym->getName().size()-5);
|
||||
return Ctx.GetOrCreateSymbol(NoStub + "$lazy_ptr");
|
||||
}
|
||||
|
||||
static MCSymbol *GetAnonSym(MCSymbol *Sym, MCContext &Ctx) {
|
||||
// Add $tmp suffix to $stub, yielding $stub$tmp.
|
||||
SmallString<128> TmpStr(Sym->getName().begin(), Sym->getName().end());
|
||||
TmpStr += "$tmp";
|
||||
return Ctx.GetOrCreateSymbol(TmpStr.str());
|
||||
return Ctx.GetOrCreateSymbol(Sym->getName() + "$tmp");
|
||||
}
|
||||
|
||||
void PPCDarwinAsmPrinter::
|
||||
|
Loading…
Reference in New Issue
Block a user