[llvm] [ORC] Make ExecutionSession non-copyable / non-moveable. (PR #214231)
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 5 06:32:50 PDT 2026
https://github.com/lhames updated https://github.com/llvm/llvm-project/pull/214231
>From 3fee9df94747fd2fd2abeaf8f47cb9564dfb25d8 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Wed, 5 Aug 2026 23:23:30 +1000
Subject: [PATCH] [ORC] Make ExecutionSession non-copyable / non-moveable.
Many ORC classes capture references to the ExecutionSession -- it is not
intended to be moved or copied.
---
llvm/include/llvm/ExecutionEngine/Orc/Core.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Core.h b/llvm/include/llvm/ExecutionEngine/Orc/Core.h
index 8ab1bb30a42b5..ea2f0f027839d 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Core.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Core.h
@@ -1138,6 +1138,11 @@ class ExecutionSession {
/// object.
LLVM_ABI ExecutionSession(std::unique_ptr<ExecutorProcessControl> EPC);
+ ExecutionSession(const ExecutionSession &) = delete;
+ ExecutionSession &operator=(const ExecutionSession &) = delete;
+ ExecutionSession(ExecutionSession &&) = delete;
+ ExecutionSession &operator=(ExecutionSession &&) = delete;
+
/// Destroy an ExecutionSession. Verifies that endSession was called prior to
/// destruction.
LLVM_ABI ~ExecutionSession();
More information about the llvm-commits
mailing list