Restore sanity to 131601.
[oota-llvm.git] / lib / ExecutionEngine / MCJIT / MCJIT.cpp
index 96e5c6803a62da2f1b407de5a2c09e84fd524b8e..09a79f64d428cd92684713df43508c390eb92f91 100644 (file)
@@ -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());
 }