Move the object being used to move-initialize when calling the base class' constructo...
authorAaron Ballman <aaron@aaronballman.com>
Wed, 12 Aug 2015 21:10:41 +0000 (21:10 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 12 Aug 2015 21:10:41 +0000 (21:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244812 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DependenceAnalysis.h

index 791305dbfbb9c1b5f8184fa2d5e2ae646977950a..b05a72ebb6f639eac6a1d3648d47cc93baff7264 100644 (file)
@@ -71,6 +71,12 @@ namespace llvm {
   class Dependence {
   protected:
     Dependence(const Dependence &) = default;
+    
+    // FIXME: When we move to MSVC 2015 as the base compiler for Visual Studio
+    // support, uncomment this line to allow a defaulted move constructor for
+    // Dependence. Currently, FullDependence relies on the copy constructor, but
+    // that is acceptable given the triviality of the class.
+    // Dependence(Dependence &&) = default;
 
   public:
     Dependence(Instruction *Source,
@@ -225,7 +231,7 @@ namespace llvm {
                    unsigned Levels);
 
     FullDependence(FullDependence &&RHS)
-        : Dependence(RHS), Levels(RHS.Levels),
+        : Dependence(std::move(RHS)), Levels(RHS.Levels),
           LoopIndependent(RHS.LoopIndependent), Consistent(RHS.Consistent),
           DV(std::move(RHS.DV)) {}