summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-10-23 20:20:22 +0000
committerLang Hames <lhames@gmail.com>2018-10-23 20:20:22 +0000
commit841796decdcc7818736a7f7ba28fc636a6a497d2 (patch)
treeb7e3c462f0abda7025af1d9c762b94f4cbbd9f67 /llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
parent5ac28a0cfda2c5f620886ace6f3b882e2e9a571d (diff)
downloadbcm5719-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/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp')
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
index 1660670ae63..b6c362b8aaa 100644
--- a/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
@@ -66,7 +66,7 @@ static bool testSetProcessAllSections(std::unique_ptr<MemoryBuffer> Obj,
ObjLayer.setProcessAllSections(ProcessAllSections);
cantFail(ObjLayer.add(JD, std::move(Obj), ES.allocateVModule()));
- ES.lookup({&JD}, {Foo}, OnResolveDoNothing, OnReadyDoNothing,
+ ES.lookup({{&JD, false}}, {Foo}, OnResolveDoNothing, OnReadyDoNothing,
NoDependenciesToRegister);
return DebugSectionSeen;
}
@@ -157,7 +157,8 @@ TEST(RTDyldObjectLinkingLayerTest, TestOverrideObjectFlags) {
ObjLayer.setOverrideObjectFlagsWithResponsibilityFlags(true);
cantFail(CompileLayer.add(JD, std::move(M), ES.allocateVModule()));
- ES.lookup({&JD}, {Foo}, [](Expected<SymbolMap> R) { cantFail(std::move(R)); },
+ ES.lookup({{&JD, false}}, {Foo},
+ [](Expected<SymbolMap> R) { cantFail(std::move(R)); },
[](Error Err) { cantFail(std::move(Err)); },
NoDependenciesToRegister);
}
@@ -219,7 +220,8 @@ TEST(RTDyldObjectLinkingLayerTest, TestAutoClaimResponsibilityForSymbols) {
ObjLayer.setAutoClaimResponsibilityForObjectSymbols(true);
cantFail(CompileLayer.add(JD, std::move(M), ES.allocateVModule()));
- ES.lookup({&JD}, {Foo}, [](Expected<SymbolMap> R) { cantFail(std::move(R)); },
+ ES.lookup({{&JD, false}}, {Foo},
+ [](Expected<SymbolMap> R) { cantFail(std::move(R)); },
[](Error Err) { cantFail(std::move(Err)); },
NoDependenciesToRegister);
}
OpenPOWER on IntegriCloud