[Orc] Add explicit move constructor and assignment operator to make MSVC happy.
authorLang Hames <lhames@gmail.com>
Mon, 19 Oct 2015 18:59:22 +0000 (18:59 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 19 Oct 2015 18:59:22 +0000 (18:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250722 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h

index 9e6eb8032b1f9614dade6205563a8b15ee5b609f..640ea04a416be3f7806bc229a0f0ea2e834d7fb4 100644 (file)
@@ -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");