cling/patches/llvm-lib-ROOT-autoload-missing-symbol-non-function.diff
Axel Naumann f2386d9e23 Fix patch paths.
git-svn-id: http://root.cern.ch/svn/root/trunk@49364 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-26 12:09:54 +00:00

21 lines
726 B
Diff

Index: lib/ExecutionEngine/JIT/JIT.cpp
===================================================================
--- lib/ExecutionEngine/JIT/JIT.cpp (revision 49336)
+++ lib/ExecutionEngine/JIT/JIT.cpp (working copy)
@@ -757,9 +757,14 @@
return (void*)&__dso_handle;
#endif
Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(GV->getName());
+
+ // FIXME: Not a lazy function; don't tell anyone...
+ if (!Ptr && LazyFunctionCreator)
+ Ptr = LazyFunctionCreator(GV->getName());
+
if (Ptr == 0) {
report_fatal_error("Could not resolve external global address: "
- +GV->getName());
+ +GV->getName());
}
addGlobalMapping(GV, Ptr);
} else {