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.

llvm-svn: 244812
This commit is contained in:
Aaron Ballman 2015-08-12 21:10:41 +00:00
parent bb02c2547f
commit c25c9fdf08
1 changed files with 7 additions and 1 deletions

View 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)) {}