summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index 96e5c6803a6..09a79f64d42 100644
--- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -104,10 +104,11 @@ 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')
- BaseName = BaseName.substr(1);
+ Name = BaseName.substr(1);
else
- Twine Name = TM->getMCAsmInfo()->getGlobalPrefix() + BaseName;
+ Name = TM->getMCAsmInfo()->getGlobalPrefix() + BaseName;
return (void*)Dyld.getSymbolAddress(Name.str());
}
OpenPOWER on IntegriCloud