summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-06-23 21:36:31 +0000
committerpatrick <patrick@openbsd.org>2019-06-23 21:36:31 +0000
commit23f101f37937a1bd4a29726cab2f76e0fb038b35 (patch)
treef7da7d6b32c2e07114da399150bfa88d72187012 /gnu/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp
parentsort previous; ok deraadt (diff)
downloadwireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.tar.xz
wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.zip
Import LLVM 8.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp')
-rw-r--r--gnu/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/gnu/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp b/gnu/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp
index 0c17f9b7ad4..d952d1be70d 100644
--- a/gnu/llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp
+++ b/gnu/llvm/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());