diff options
-rw-r--r-- | llvm/include/llvm/IR/PassManager.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/include/llvm/IR/PassManager.h b/llvm/include/llvm/IR/PassManager.h index 07b30fe0fc6..4715777601d 100644 --- a/llvm/include/llvm/IR/PassManager.h +++ b/llvm/include/llvm/IR/PassManager.h @@ -241,8 +241,16 @@ public: /// /// It can be passed a flag to get debug logging as the passes are run. PassManager(bool DebugLogging = false) : DebugLogging(DebugLogging) {} - PassManager(PassManager &&) = default; - PassManager &operator=(PassManager &&) = default; + // We have to explicitly define all the special member functions because MSVC + // refuses to generate them. + PassManager(PassManager &&Arg) + : Passes(std::move(Arg.Passes)), + DebugLogging(std::move(Arg.DebugLogging)) {} + PassManager &operator=(PassManager &&RHS) { + Passes = std::move(RHS.Passes); + DebugLogging = std::move(RHS.DebugLogging); + return *this; + } /// \brief Run all of the passes in this manager over the IR. PreservedAnalyses run(IRUnitT &IR, AnalysisManagerT &AM, |