From 7b9ff8d1d23d1eb508543c25118b0f3c8585bd37 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 12 Aug 2015 21:10:41 +0000 Subject: [PATCH] Move the object being used to move-initialize when calling the base class' constructor from the ctor-initializer. This should have no effect given the triviality of the class, but it allows for easier maintenance should the semantics of the base class change. NFC intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244812 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/DependenceAnalysis.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/llvm/Analysis/DependenceAnalysis.h b/include/llvm/Analysis/DependenceAnalysis.h index 791305dbfbb..b05a72ebb6f 100644 --- a/include/llvm/Analysis/DependenceAnalysis.h +++ b/include/llvm/Analysis/DependenceAnalysis.h @@ -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)) {} -- 2.34.1