diff options
| author | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-10-01 16:42:50 +0000 |
|---|---|---|
| committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-10-01 16:42:50 +0000 |
| commit | 89bdd103e58ad67886d1769622b8245b35869c53 (patch) | |
| tree | f8129e64074afb7db16116e1b3e12baa5af2d84d /llvm/lib/ExecutionEngine | |
| parent | 97e8a87cfbaf18450dc2727297df84522abaa394 (diff) | |
| download | bcm5719-llvm-89bdd103e58ad67886d1769622b8245b35869c53.tar.gz bcm5719-llvm-89bdd103e58ad67886d1769622b8245b35869c53.zip | |
Fixing MCJIT multiple module linking for OSX
llvm-svn: 191780
Diffstat (limited to 'llvm/lib/ExecutionEngine')
| -rw-r--r-- | llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp index 9eaff4d68a2..09fc75c6ae0 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/llvm/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); |

