diff options
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/lli/OrcLazyJIT.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/llvm/tools/lli/OrcLazyJIT.h b/llvm/tools/lli/OrcLazyJIT.h index 3f89f6a5168..2b2db6e668c 100644 --- a/llvm/tools/lli/OrcLazyJIT.h +++ b/llvm/tools/lli/OrcLazyJIT.h @@ -92,25 +92,28 @@ public: // 1) Search the JIT symbols. // 2) Check for C++ runtime overrides. // 3) Search the host process (LLI)'s symbol table. - auto FallbackLookup = - [this](const std::string &Name) { + auto Resolver = + orc::createLambdaResolver( + [this](const std::string &Name) { - if (auto Sym = CODLayer.findSymbol(Name, true)) - return RuntimeDyld::SymbolInfo(Sym.getAddress(), Sym.getFlags()); + if (auto Sym = CODLayer.findSymbol(Name, true)) + return RuntimeDyld::SymbolInfo(Sym.getAddress(), Sym.getFlags()); - if (auto Sym = CXXRuntimeOverrides.searchOverrides(Name)) - return Sym; + if (auto Sym = CXXRuntimeOverrides.searchOverrides(Name)) + return Sym; - if (auto Addr = RTDyldMemoryManager::getSymbolAddressInProcess(Name)) - return RuntimeDyld::SymbolInfo(Addr, JITSymbolFlags::Exported); + if (auto Addr = RTDyldMemoryManager::getSymbolAddressInProcess(Name)) + return RuntimeDyld::SymbolInfo(Addr, JITSymbolFlags::Exported); - return RuntimeDyld::SymbolInfo(nullptr); - }; + return RuntimeDyld::SymbolInfo(nullptr); + }, + [](const std::string &Name) { return RuntimeDyld::SymbolInfo(nullptr); } + ); // Add the module to the JIT. std::vector<std::unique_ptr<Module>> S; S.push_back(std::move(M)); - auto H = CODLayer.addModuleSet(std::move(S), std::move(FallbackLookup)); + auto H = CODLayer.addModuleSet(std::move(S), nullptr, std::move(Resolver)); // Run the static constructors, and save the static destructor runner for // execution when the JIT is torn down. |

