[Orc] Fix MSVC build errors due to r257265 by adding explicit move construction
authorLang Hames <lhames@gmail.com>
Sat, 9 Jan 2016 22:05:08 +0000 (22:05 +0000)
committerLang Hames <lhames@gmail.com>
Sat, 9 Jan 2016 22:05:08 +0000 (22:05 +0000)
and assignment to LogicalDylibResources.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257269 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h

index 0eb8693df42e77770b84a52e35f4205be788b30a..fcb036fa371d937fbb11638a8a5deebab72ad6f6 100644 (file)
@@ -128,6 +128,22 @@ private:
                             std::unique_ptr<RuntimeDyld::SymbolResolver>)>
       ModuleAdderFtor;
 
+    LogicalDylibResources() = default;
+
+    // Explicit move constructor to make MSVC happy.
+    LogicalDylibResources(LogicalDylibResources &&Other)
+      : ExternalSymbolResolver(std::move(Other.ExternalSymbolResolver)),
+        MemMgr(std::move(Other.MemMgr)),
+        ModuleAdder(std::move(Other.ModuleAdder)) {}
+
+    // Explicit move assignment operator to make MSVC happy.
+    LogicalDylibResources& operator=(LogicalDylibResources &&Other) {
+      ExternalSymbolResolver = std::move(Other.ExternalSymbolResolver);
+      MemMgr = std::move(Other.MemMgr);
+      ModuleAdder = std::move(Other.ModuleAdder);
+      return *this;
+    }
+
     SymbolResolverFtor ExternalSymbolResolver;
     std::unique_ptr<ResourceOwner<RuntimeDyld::MemoryManager>> MemMgr;
     ModuleAdderFtor ModuleAdder;