summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/MCJIT/MCJIT.cpp
diff options
context:
space:
mode:
authorAndrew Kaylor <andrew.kaylor@intel.com>2013-10-01 16:42:50 +0000
committerAndrew Kaylor <andrew.kaylor@intel.com>2013-10-01 16:42:50 +0000
commit52c9016db0560644a03ca661302e45143372f2fc (patch)
tree50126bb71284f98435c5e3e7fae1b03e4a6d8766 /lib/ExecutionEngine/MCJIT/MCJIT.cpp
parent17f7d099e4a381a3876ce1e9412f0b0d76d71e8a (diff)
downloadllvm-52c9016db0560644a03ca661302e45143372f2fc.tar.gz
llvm-52c9016db0560644a03ca661302e45143372f2fc.tar.bz2
llvm-52c9016db0560644a03ca661302e45143372f2fc.tar.xz
Fixing MCJIT multiple module linking for OSX
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191780 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/MCJIT/MCJIT.cpp')
-rw-r--r--lib/ExecutionEngine/MCJIT/MCJIT.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index 9eaff4d68a..09fc75c6ae 100644
--- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -526,6 +526,10 @@ void MCJIT::NotifyFreeingObject(const ObjectImage& Obj) {
uint64_t LinkingMemoryManager::getSymbolAddress(const std::string &Name) {
uint64_t Result = ParentEngine->getSymbolAddress(Name, false);
+ // If the symbols wasn't found and it begins with an underscore, try again
+ // without the underscore.
+ if (!Result && Name[0] == '_')
+ Result = ParentEngine->getSymbolAddress(Name.substr(1), false);
if (Result)
return Result;
return ClientMM->getSymbolAddress(Name);