From: Lang Hames Date: Mon, 19 Oct 2015 18:59:22 +0000 (+0000) Subject: [Orc] Add explicit move constructor and assignment operator to make MSVC happy. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=4438c623f75083ad198845643469366fb22ba782 [Orc] Add explicit move constructor and assignment operator to make MSVC happy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250722 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h b/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h index 9e6eb8032b1..640ea04a416 100644 --- a/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h +++ b/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h @@ -22,6 +22,7 @@ #include "llvm/ExecutionEngine/SectionMemoryManager.h" #include "llvm/Transforms/Utils/Cloning.h" #include +#include #include #include "llvm/Support/Debug.h" @@ -66,6 +67,23 @@ private: std::set StubsToClone; std::unique_ptr 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");