[llvm] r257269 - [Orc] Fix MSVC build errors due to r257265 by adding explicit move construction

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 9 14:05:08 PST 2016


Author: lhames
Date: Sat Jan  9 16:05:08 2016
New Revision: 257269

URL: http://llvm.org/viewvc/llvm-project?rev=257269&view=rev
Log:
[Orc] Fix MSVC build errors due to r257265 by adding explicit move construction
and assignment to LogicalDylibResources.

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=257269&r1=257268&r2=257269&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h Sat Jan  9 16:05:08 2016
@@ -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;




More information about the llvm-commits mailing list