simplify by using the twine form of GetOrCreateSymbol

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84565 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-10-19 23:05:23 +00:00
parent 8e6323c8b9
commit 84d8bf9d28

View File

@@ -38,10 +38,8 @@ MachineModuleInfoMachO &X86MCInstLower::getMachOMMI() const {
MCSymbol *X86MCInstLower::GetPICBaseSymbol() const { MCSymbol *X86MCInstLower::GetPICBaseSymbol() const {
SmallString<60> Name; return Ctx.GetOrCreateSymbol(Twine(AsmPrinter.MAI->getPrivateGlobalPrefix())+
raw_svector_ostream(Name) << AsmPrinter.MAI->getPrivateGlobalPrefix() Twine(AsmPrinter.getFunctionNumber())+"$pb");
<< AsmPrinter.getFunctionNumber() << "$pb";
return Ctx.GetOrCreateSymbol(Name.str());
} }
@@ -449,10 +447,9 @@ void X86AsmPrinter::printInstructionThroughMCStreamer(const MachineInstr *MI) {
// MYGLOBAL + (. - PICBASE) // MYGLOBAL + (. - PICBASE)
// However, we can't generate a ".", so just emit a new label here and refer // However, we can't generate a ".", so just emit a new label here and refer
// to it. We know that this operand flag occurs at most once per function. // to it. We know that this operand flag occurs at most once per function.
SmallString<64> Name; const char *Prefix = MAI->getPrivateGlobalPrefix();
raw_svector_ostream(Name) << MAI->getPrivateGlobalPrefix() MCSymbol *DotSym = OutContext.GetOrCreateSymbol(Twine(Prefix)+"picbaseref"+
<< "picbaseref" << getFunctionNumber(); Twine(getFunctionNumber()));
MCSymbol *DotSym = OutContext.GetOrCreateSymbol(Name.str());
OutStreamer.EmitLabel(DotSym); OutStreamer.EmitLabel(DotSym);
// Now that we have emitted the label, lower the complex operand expression. // Now that we have emitted the label, lower the complex operand expression.