summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/lli.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2016-05-25 16:23:59 +0000
committerLang Hames <lhames@gmail.com>2016-05-25 16:23:59 +0000
commitbf9d1aa9310dd3fbb53b885469cdf3dc87e85480 (patch)
treeebd7b3b7aefb46c60f8e57a062b5618a44672f66 /llvm/tools/lli/lli.cpp
parenta00df49dc5c1d94b04e9c4271018c6aaa97d7426 (diff)
downloadbcm5719-llvm-bf9d1aa9310dd3fbb53b885469cdf3dc87e85480.tar.gz
bcm5719-llvm-bf9d1aa9310dd3fbb53b885469cdf3dc87e85480.zip
[RuntimeDyld] Call the SymbolResolver::findSymbolInLogicalDylib method when
searching for external symbols, and fall back to the SymbolResolver::findSymbol method if the former returns null. This makes RuntimeDyld behave more like a static linker: Symbol definitions from within the current module's "logical dylib" will be preferred to external definitions. We can build on this behavior in the future to properly support weak symbol handling. Custom symbol resolvers that override the findSymbolInLogicalDylib method may notice changes due to this patch. Clients who have not overridden this method should generally be unaffected, however users of the OrcMCJITReplacement class may notice changes. llvm-svn: 270716
Diffstat (limited to 'llvm/tools/lli/lli.cpp')
-rw-r--r--llvm/tools/lli/lli.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index e691b5ae231..28232478217 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/tools/lli/lli.cpp
@@ -662,12 +662,12 @@ int main(int argc, char **argv, char * const *envp) {
// Forward MCJIT's symbol resolution calls to the remote.
static_cast<ForwardingMemoryManager*>(RTDyldMM)->setResolver(
orc::createLambdaResolver(
+ [](const std::string &Name) { return nullptr; },
[&](const std::string &Name) {
if (auto Addr = ExitOnErr(R.getSymbolAddress(Name)))
return RuntimeDyld::SymbolInfo(Addr, JITSymbolFlags::Exported);
return RuntimeDyld::SymbolInfo(nullptr);
- },
- [](const std::string &Name) { return nullptr; }
+ }
));
// Grab the target address of the JIT'd main function on the remote and call
OpenPOWER on IntegriCloud