[llvm] r284745 - Put the move ctor for PassManager back for now, it breaks some builds.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 09:50:07 PDT 2016


Author: d0k
Date: Thu Oct 20 11:50:07 2016
New Revision: 284745

URL: http://llvm.org/viewvc/llvm-project?rev=284745&view=rev
Log:
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.

Modified:
    llvm/trunk/include/llvm/IR/PassManager.h

Modified: llvm/trunk/include/llvm/IR/PassManager.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/PassManager.h?rev=284745&r1=284744&r2=284745&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/PassManager.h (original)
+++ llvm/trunk/include/llvm/IR/PassManager.h Thu Oct 20 11:50:07 2016
@@ -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,




More information about the llvm-commits mailing list