summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/lli')
-rw-r--r--llvm/tools/lli/OrcLazyJIT.h7
-rw-r--r--llvm/tools/lli/RemoteJITUtils.h4
2 files changed, 5 insertions, 6 deletions
diff --git a/llvm/tools/lli/OrcLazyJIT.h b/llvm/tools/lli/OrcLazyJIT.h
index fc02a10b514..5592fb65139 100644
--- a/llvm/tools/lli/OrcLazyJIT.h
+++ b/llvm/tools/lli/OrcLazyJIT.h
@@ -61,7 +61,8 @@ public:
IndirectStubsManagerBuilder IndirectStubsMgrBuilder,
bool InlineStubs)
: TM(std::move(TM)), DL(this->TM->createDataLayout()),
- CCMgr(std::move(CCMgr)),
+ CCMgr(std::move(CCMgr)),
+ ObjectLayer([]() { return std::make_shared<SectionMemoryManager>(); }),
CompileLayer(ObjectLayer, orc::SimpleCompiler(*this->TM)),
IRDumpLayer(CompileLayer, createDebugDumper()),
CODLayer(IRDumpLayer, extractSingleFunction, *this->CCMgr,
@@ -125,9 +126,7 @@ public:
// Add the module to the JIT.
ModulesHandle =
- CODLayer.addModule(std::move(M),
- llvm::make_unique<SectionMemoryManager>(),
- std::move(Resolver));
+ CODLayer.addModule(std::move(M), std::move(Resolver));
} else
CODLayer.addExtraModule(ModulesHandle, std::move(M));
diff --git a/llvm/tools/lli/RemoteJITUtils.h b/llvm/tools/lli/RemoteJITUtils.h
index 3c82f73ff07..4e948413865 100644
--- a/llvm/tools/lli/RemoteJITUtils.h
+++ b/llvm/tools/lli/RemoteJITUtils.h
@@ -84,7 +84,7 @@ public:
this->MemMgr = std::move(MemMgr);
}
- void setResolver(std::unique_ptr<JITSymbolResolver> Resolver) {
+ void setResolver(std::shared_ptr<JITSymbolResolver> Resolver) {
this->Resolver = std::move(Resolver);
}
@@ -145,7 +145,7 @@ public:
private:
std::unique_ptr<RuntimeDyld::MemoryManager> MemMgr;
- std::unique_ptr<JITSymbolResolver> Resolver;
+ std::shared_ptr<JITSymbolResolver> Resolver;
};
}
OpenPOWER on IntegriCloud