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/LLJIT.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/LLJIT.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/LLJIT.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp index ac71a5e7673..8486fe449f7 100644 --- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp +++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp @@ -76,7 +76,7 @@ Error LLJIT::addObjectFile(JITDylib &JD, std::unique_ptr<MemoryBuffer> Obj) { Expected<JITEvaluatedSymbol> LLJIT::lookupLinkerMangled(JITDylib &JD, StringRef Name) { - return ES->lookup({&JD}, ES->intern(Name)); + return ES->lookup({{&JD, true}}, ES->intern(Name)); } LLJIT::LLJIT(std::unique_ptr<ExecutionSession> ES, @@ -144,13 +144,13 @@ void LLJIT::recordCtorDtors(Module &M) { } Expected<std::unique_ptr<LLLazyJIT>> - LLLazyJIT::Create(JITTargetMachineBuilder JTMB, DataLayout DL, - unsigned NumCompileThreads) { +LLLazyJIT::Create(JITTargetMachineBuilder JTMB, DataLayout DL, + JITTargetAddress ErrorAddr, unsigned NumCompileThreads) { auto ES = llvm::make_unique<ExecutionSession>(); const Triple &TT = JTMB.getTargetTriple(); - auto LCTMgr = createLocalLazyCallThroughManager(TT, *ES, 0); + auto LCTMgr = createLocalLazyCallThroughManager(TT, *ES, ErrorAddr); if (!LCTMgr) return LCTMgr.takeError(); |