Skip to content

Commit

Permalink
Move the object being used to move-initialize when calling the base c…
Browse files Browse the repository at this point in the history
…lass' 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
  • Loading branch information
AaronBallman committed Aug 12, 2015
1 parent 6b8e62f commit 7b9ff8d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/llvm/Analysis/DependenceAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)) {}

Expand Down

0 comments on commit 7b9ff8d

Please sign in to comment.