From c32b5967a7a59204bc2b33b608eadd36eec58fea Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 20 Oct 2016 16:50:07 +0000 Subject: [PATCH] Put the move ctor for PassManager back for now, it breaks some builds. For some reason using the default move ctor creates undefined references to it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284745 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/PassManager.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/llvm/IR/PassManager.h b/include/llvm/IR/PassManager.h index 07b30fe0fc6..4715777601d 100644 --- a/include/llvm/IR/PassManager.h +++ b/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,