diff --git a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp index 2f0b959156b..77b0d359331 100644 --- a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp +++ b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp @@ -35,7 +35,7 @@ MCSymbol *X86ATTAsmPrinter::GetPICBaseSymbol() { assert(Subtarget->isTargetELF() && "Don't know how to print PIC label!"); raw_svector_ostream(Name) << ".Lllvm$" << getFunctionNumber()<<".$piclabel"; } - return OutContext.GetOrCreateSymbol(StringRef(Name.data(), Name.size())); + return OutContext.GetOrCreateSymbol(Name.str()); }