From 2b9e24c02c927777f4de848243d1c4f1b0307201 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 19 Oct 2015 18:59:22 +0000 Subject: [PATCH] [Orc] Add explicit move constructor and assignment operator to make MSVC happy. llvm-svn: 250722 --- .../ExecutionEngine/Orc/CompileOnDemandLayer.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h index 9e6eb8032b1f..640ea04a416b 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h +++ b/llvm/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");