Skip to content
Snippets Groups Projects
Commit 13733a13 authored by Jim Grosbach's avatar Jim Grosbach
Browse files

Avoid a Twine that referenced a tmp (which proceded to go out of scope before

the Twine was used).

llvm-svn: 131612
parent 2f1e9e61
No related branches found
No related tags found
No related merge requests found
......@@ -104,12 +104,10 @@ void *MCJIT::getPointerToFunction(Function *F) {
// FIXME: Should we be using the mangler for this? Probably.
StringRef BaseName = F->getName();
Twine Name;
if (BaseName[0] == '\1')
Name = BaseName.substr(1);
else
Name = TM->getMCAsmInfo()->getGlobalPrefix() + BaseName;
return (void*)Dyld.getSymbolAddress(Name.str());
return (void*)Dyld.getSymbolAddress(BaseName.substr(1));
return (void*)Dyld.getSymbolAddress((TM->getMCAsmInfo()->getGlobalPrefix()
+ BaseName).str());
}
void *MCJIT::recompileAndRelinkFunction(Function *F) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment