[llvm] f12db8c - [ORC] cloneToNewContext() can work with a const-ref to ThreadSafeModule
Stefan Gränitz via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 13 12:01:51 PDT 2020
Author: Stefan Gränitz
Date: 2020-08-13T21:01:21+02:00
New Revision: f12db8cf750bb16515ba635143ca34b0c012968a
URL: https://github.com/llvm/llvm-project/commit/f12db8cf750bb16515ba635143ca34b0c012968a
DIFF: https://github.com/llvm/llvm-project/commit/f12db8cf750bb16515ba635143ca34b0c012968a.diff
LOG: [ORC] cloneToNewContext() can work with a const-ref to ThreadSafeModule
Added:
Modified:
llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h
llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h b/llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h
index 58c96737e580..82f2b7464953 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h
@@ -162,7 +162,7 @@ using GVModifier = std::function<void(GlobalValue &)>;
/// Clones the given module on to a new context.
ThreadSafeModule
-cloneToNewContext(ThreadSafeModule &TSMW,
+cloneToNewContext(const ThreadSafeModule &TSMW,
GVPredicate ShouldCloneDef = GVPredicate(),
GVModifier UpdateClonedDefSource = GVModifier());
diff --git a/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp b/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
index 1f4e6f132115..2e128dd23744 100644
--- a/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
@@ -15,7 +15,7 @@
namespace llvm {
namespace orc {
-ThreadSafeModule cloneToNewContext(ThreadSafeModule &TSM,
+ThreadSafeModule cloneToNewContext(const ThreadSafeModule &TSM,
GVPredicate ShouldCloneDef,
GVModifier UpdateClonedDefSource) {
assert(TSM && "Can not clone null module");
More information about the llvm-commits
mailing list