diff options
author | Lang Hames <lhames@gmail.com> | 2018-10-23 20:20:22 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2018-10-23 20:20:22 +0000 |
commit | 841796decdcc7818736a7f7ba28fc636a6a497d2 (patch) | |
tree | b7e3c462f0abda7025af1d9c762b94f4cbbd9f67 /llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp | |
parent | 5ac28a0cfda2c5f620886ace6f3b882e2e9a571d (diff) | |
download | bcm5719-llvm-841796decdcc7818736a7f7ba28fc636a6a497d2.tar.gz bcm5719-llvm-841796decdcc7818736a7f7ba28fc636a6a497d2.zip |
[ORC] Change how non-exported symbols are matched during lookup.
In the new scheme the client passes a list of (JITDylib&, bool) pairs, rather
than a list of JITDylibs. For each JITDylib the boolean indicates whether or not
to match against non-exported symbols (true means that they should be found,
false means that they should not). The MatchNonExportedInJD and MatchNonExported
parameters on lookup are removed.
The new scheme is more flexible, and easier to understand.
This patch also updates JITDylib search orders to be lists of (JITDylib&, bool)
pairs to match the new lookup scheme. Error handling is also plumbed through
the LLJIT class to allow regression tests to fail predictably when a lookup from
a lazy call-through fails.
llvm-svn: 345077
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp index 616251c7e00..299d76183cd 100644 --- a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp @@ -50,10 +50,11 @@ public: MR.addDependenciesForAll(Deps); }; - MR.getTargetJITDylib().withSearchOrderDo([&](const JITDylibList &JDs) { - ES.lookup(JDs, InternedSymbols, OnResolvedWithUnwrap, OnReady, - RegisterDependencies, &MR.getTargetJITDylib()); - }); + JITDylibSearchList SearchOrder; + MR.getTargetJITDylib().withSearchOrderDo( + [&](const JITDylibSearchList &JDs) { SearchOrder = JDs; }); + ES.lookup(SearchOrder, InternedSymbols, OnResolvedWithUnwrap, OnReady, + RegisterDependencies); } Expected<LookupSet> getResponsibilitySet(const LookupSet &Symbols) { |