X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=tools%2Flli%2FOrcLazyJIT.h;h=2b2db6e668cc60de448a19c79b787424d050b8e6;hp=3f89f6a5168d06e963e2af1e2191f907aa444641;hb=a1c91277c445c3a9d9101629d157af4c6a9b46b0;hpb=9051b7fc69d7ebe5876177f16f70504cbfe87ccb diff --git a/tools/lli/OrcLazyJIT.h b/tools/lli/OrcLazyJIT.h index 3f89f6a5168..2b2db6e668c 100644 --- a/tools/lli/OrcLazyJIT.h +++ b/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> 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.