[llvm] r250722 - [Orc] Add explicit move constructor and assignment operator to make MSVC happy.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 11:59:22 PDT 2015


Author: lhames
Date: Mon Oct 19 13:59:22 2015
New Revision: 250722

URL: http://llvm.org/viewvc/llvm-project?rev=250722&view=rev
Log:
[Orc] Add explicit move constructor and assignment operator to make MSVC happy.

Modified:
    llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h

Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h?rev=250722&r1=250721&r2=250722&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h Mon Oct 19 13:59:22 2015
@@ -22,6 +22,7 @@
 #include "llvm/ExecutionEngine/SectionMemoryManager.h"
 #include "llvm/Transforms/Utils/Cloning.h"
 #include <list>
+#include <memory>
 #include <set>
 
 #include "llvm/Support/Debug.h"
@@ -66,6 +67,23 @@ private:
     std::set<const Function*> StubsToClone;
     std::unique_ptr<IndirectStubsMgrT> StubsMgr;
 
+    LogicalModuleResources() {}
+
+    LogicalModuleResources(LogicalModuleResources &&Other) {
+      SourceModule = std::move(Other.SourceModule);
+      StubsToClone = std::move(StubsToClone);
+      StubsMgr = std::move(StubsMgr);
+    }
+
+    // Explicit move constructor to make MSVC happy.
+    LogicalModuleResources& operator=(LogicalModuleResources &&Other) {
+      SourceModule = std::move(Other.SourceModule);
+      StubsToClone = std::move(StubsToClone);
+      StubsMgr = std::move(StubsMgr);
+      return *this;
+    }
+
+    // Explicit move assignment to make MSVC happy.
     JITSymbol findSymbol(StringRef Name, bool ExportedSymbolsOnly) {
       if (Name.endswith("$stub_ptr") && !ExportedSymbolsOnly) {
         assert(!ExportedSymbolsOnly && "Stubs are never exported");




More information about the llvm-commits mailing list