diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-02-14 21:24:03 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-02-14 21:24:03 +0000 |
commit | d75c7debad4509ece98792074e64b8a650a27bdb (patch) | |
tree | f8d77975739b43bf7ffef0612579168cb9ec9474 /llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp | |
parent | 9c2f6c4bb805c7ac08c8925c96e429fcc322725e (diff) |
Notes
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp b/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp index d311f34179c7..023940dc8298 100644 --- a/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp @@ -11,9 +11,14 @@ namespace llvm { namespace orc { +IRCompileLayer::IRCompiler::~IRCompiler() {} + IRCompileLayer::IRCompileLayer(ExecutionSession &ES, ObjectLayer &BaseLayer, - CompileFunction Compile) - : IRLayer(ES), BaseLayer(BaseLayer), Compile(std::move(Compile)) {} + std::unique_ptr<IRCompiler> Compile) + : IRLayer(ES, ManglingOpts), BaseLayer(BaseLayer), + Compile(std::move(Compile)) { + ManglingOpts = &this->Compile->getManglingOptions(); +} void IRCompileLayer::setNotifyCompiled(NotifyCompiledFunction NotifyCompiled) { std::lock_guard<std::mutex> Lock(IRLayerMutex); @@ -24,7 +29,7 @@ void IRCompileLayer::emit(MaterializationResponsibility R, ThreadSafeModule TSM) { assert(TSM && "Module must not be null"); - if (auto Obj = TSM.withModuleDo(Compile)) { + if (auto Obj = TSM.withModuleDo(*Compile)) { { std::lock_guard<std::mutex> Lock(IRLayerMutex); if (NotifyCompiled) |