diff options
Diffstat (limited to 'llvm/tools/lli/lli.cpp')
-rw-r--r-- | llvm/tools/lli/lli.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp index b23733eac99..4794fe532a5 100644 --- a/llvm/tools/lli/lli.cpp +++ b/llvm/tools/lli/lli.cpp @@ -752,15 +752,6 @@ static orc::IRTransformLayer2::TransformFunction createDebugDumper() { int runOrcLazyJIT(const char *ProgName) { // Start setting up the JIT environment. - // First add lli's symbols into the JIT's search space. - std::string ErrMsg; - sys::DynamicLibrary LibLLI = - sys::DynamicLibrary::getPermanentLibrary(nullptr, &ErrMsg); - if (!LibLLI.isValid()) { - errs() << "Error loading lli symbols: " << ErrMsg << ".\n"; - return 1; - } - // Parse the main module. orc::ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>()); SMDiagnostic Err; @@ -802,9 +793,8 @@ int runOrcLazyJIT(const char *ProgName) { } return Dump(std::move(TSM), R); }); - J->getMainJITDylib().setFallbackDefinitionGenerator( - orc::DynamicLibraryFallbackGenerator( - std::move(LibLLI), DL, [](orc::SymbolStringPtr) { return true; })); + J->getMainJITDylib().setFallbackDefinitionGenerator(ExitOnErr( + orc::DynamicLibraryFallbackGenerator::CreateForCurrentProcess(DL))); orc::MangleAndInterner Mangle(J->getExecutionSession(), DL); orc::LocalCXXRuntimeOverrides2 CXXRuntimeOverrides; |