summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp b/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp
index 0c17f9b7ad4..5dee1c80e0b 100644
--- a/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp
@@ -22,16 +22,16 @@ void IRCompileLayer2::setNotifyCompiled(NotifyCompiledFunction NotifyCompiled) {
}
void IRCompileLayer2::emit(MaterializationResponsibility R, VModuleKey K,
- std::unique_ptr<Module> M) {
- assert(M && "Module must not be null");
+ 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(K, std::move(TSM));
else
- M = nullptr;
+ TSM = ThreadSafeModule();
}
BaseLayer.emit(std::move(R), std::move(K), std::move(*Obj));
} else {
OpenPOWER on IntegriCloud