mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-11 06:38:20 +00:00
Avoid a Twine that referenced a tmp (which proceded to go out of scope before
the Twine was used). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131612 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -104,12 +104,10 @@ void *MCJIT::getPointerToFunction(Function *F) {
|
|||||||
|
|
||||||
// FIXME: Should we be using the mangler for this? Probably.
|
// FIXME: Should we be using the mangler for this? Probably.
|
||||||
StringRef BaseName = F->getName();
|
StringRef BaseName = F->getName();
|
||||||
Twine Name;
|
|
||||||
if (BaseName[0] == '\1')
|
if (BaseName[0] == '\1')
|
||||||
Name = BaseName.substr(1);
|
return (void*)Dyld.getSymbolAddress(BaseName.substr(1));
|
||||||
else
|
return (void*)Dyld.getSymbolAddress((TM->getMCAsmInfo()->getGlobalPrefix()
|
||||||
Name = TM->getMCAsmInfo()->getGlobalPrefix() + BaseName;
|
+ BaseName).str());
|
||||||
return (void*)Dyld.getSymbolAddress(Name.str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void *MCJIT::recompileAndRelinkFunction(Function *F) {
|
void *MCJIT::recompileAndRelinkFunction(Function *F) {
|
||||||
|
Reference in New Issue
Block a user