[llvm] r191780 - Fixing MCJIT multiple module linking for OSX
Andrew Kaylor
andrew.kaylor at intel.com
Tue Oct 1 09:42:50 PDT 2013
Author: akaylor
Date: Tue Oct 1 11:42:50 2013
New Revision: 191780
URL: http://llvm.org/viewvc/llvm-project?rev=191780&view=rev
Log:
Fixing MCJIT multiple module linking for OSX
Modified:
llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp
Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp?rev=191780&r1=191779&r2=191780&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp Tue Oct 1 11:42:50 2013
@@ -526,6 +526,10 @@ void MCJIT::NotifyFreeingObject(const Ob
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);
More information about the llvm-commits
mailing list