diff options
Diffstat (limited to 'lib/ExecutionEngine/Orc/IRCompileLayer.cpp')
| -rw-r--r-- | lib/ExecutionEngine/Orc/IRCompileLayer.cpp | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/ExecutionEngine/Orc/IRCompileLayer.cpp b/lib/ExecutionEngine/Orc/IRCompileLayer.cpp index 0c17f9b7ad497..d952d1be70dab 100644 --- a/lib/ExecutionEngine/Orc/IRCompileLayer.cpp +++ b/lib/ExecutionEngine/Orc/IRCompileLayer.cpp @@ -12,28 +12,28 @@  namespace llvm {  namespace orc { -IRCompileLayer2::IRCompileLayer2(ExecutionSession &ES, ObjectLayer &BaseLayer, +IRCompileLayer::IRCompileLayer(ExecutionSession &ES, ObjectLayer &BaseLayer,                                   CompileFunction Compile)      : IRLayer(ES), BaseLayer(BaseLayer), Compile(std::move(Compile)) {} -void IRCompileLayer2::setNotifyCompiled(NotifyCompiledFunction NotifyCompiled) { +void IRCompileLayer::setNotifyCompiled(NotifyCompiledFunction NotifyCompiled) {    std::lock_guard<std::mutex> Lock(IRLayerMutex);    this->NotifyCompiled = std::move(NotifyCompiled);  } -void IRCompileLayer2::emit(MaterializationResponsibility R, VModuleKey K, -                           std::unique_ptr<Module> M) { -  assert(M && "Module must not be null"); +void IRCompileLayer::emit(MaterializationResponsibility R, +                          ThreadSafeModule TSM) { +  assert(TSM.getModule() && "Module must not be null"); -  if (auto Obj = Compile(*M)) { +  if (auto Obj = Compile(*TSM.getModule())) {      {        std::lock_guard<std::mutex> Lock(IRLayerMutex);        if (NotifyCompiled) -        NotifyCompiled(K, std::move(M)); +        NotifyCompiled(R.getVModuleKey(), std::move(TSM));        else -        M = nullptr; +        TSM = ThreadSafeModule();      } -    BaseLayer.emit(std::move(R), std::move(K), std::move(*Obj)); +    BaseLayer.emit(std::move(R), std::move(*Obj));    } else {      R.failMaterialization();      getExecutionSession().reportError(Obj.takeError());  | 
