[ORC] cloneToNewContext() can work with a const-ref to ThreadSafeModule
authorStefan Gränitz <stefan.graenitz@gmail.com>
Sun, 2 Aug 2020 12:37:33 +0000 (14:37 +0200)
committerStefan Gränitz <stefan.graenitz@gmail.com>
Thu, 13 Aug 2020 19:01:21 +0000 (21:01 +0200)
llvm/include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h
llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp

index 58c9673..82f2b74 100644 (file)
@@ -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());
 
index 1f4e6f1..2e128dd 100644 (file)
@@ -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");