From e38bc14a0106618ada8a2ea1b99c562a220c7a7c Mon Sep 17 00:00:00 2001 From: Torok Edwin Date: Tue, 30 Mar 2010 12:31:58 +0000 Subject: [PATCH] Honour addGlobalMapping() in the interpreter, if it was used to add mappings for external Functions (the JIT does honour this). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99885 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 7b061d3ac34..9b3f25dc926 100644 --- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -265,6 +265,7 @@ GenericValue Interpreter::callExternalFunction(Function *F, if (RF == RawFunctions->end()) { RawFn = (RawFunc)(intptr_t) sys::DynamicLibrary::SearchForAddressOfSymbol(F->getName()); + RawFn = (RawFunc)(intptr_t)getPointerToGlobalIfAvailable(F); if (RawFn != 0) RawFunctions->insert(std::make_pair(F, RawFn)); // Cache for later } else { -- 2.34.1