From: David Blaikie Date: Mon, 9 Nov 2015 23:30:15 +0000 (+0000) Subject: Fix -Wdeprecated warnings due to the use of copy ops on SCEVPredicate derived class... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=b6cb6238b9c5243ec813a860ae153adda1acddff Fix -Wdeprecated warnings due to the use of copy ops on SCEVPredicate derived class objects SCEVUnionPredicate is copied constructed here: lib/Transforms/Scalar/LoopDistribute.cpp:793 and move assigned (which can use the base class's copy ctor just fine/without extra cost (I'd add it if it weren't for MSVC's issues meaning = default is insufficient)) here: lib/Transforms/Utils/LoopVersioning.cpp:46 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252537 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index 1bd7fd0db55..9db3a058837 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -183,12 +183,13 @@ namespace llvm { protected: SCEVPredicateKind Kind; + ~SCEVPredicate() = default; + SCEVPredicate(const SCEVPredicate&) = default; + SCEVPredicate &operator=(const SCEVPredicate&) = default; public: SCEVPredicate(const FoldingSetNodeIDRef ID, SCEVPredicateKind Kind); - virtual ~SCEVPredicate() {} - SCEVPredicateKind getKind() const { return Kind; } /// \brief Returns the estimated complexity of this predicate. @@ -240,7 +241,7 @@ namespace llvm { /// expressions are equal, and this can be checked at run-time. We assume /// that the left hand side is a SCEVUnknown and the right hand side a /// constant. - class SCEVEqualPredicate : public SCEVPredicate { + class SCEVEqualPredicate final : public SCEVPredicate { /// We assume that LHS == RHS, where LHS is a SCEVUnknown and RHS a /// constant. const SCEVUnknown *LHS; @@ -271,7 +272,7 @@ namespace llvm { /// SCEVUnionPredicate - This class represents a composition of other /// SCEV predicates, and is the class that most clients will interact with. /// This is equivalent to a logical "AND" of all the predicates in the union. - class SCEVUnionPredicate : public SCEVPredicate { + class SCEVUnionPredicate final : public SCEVPredicate { private: typedef DenseMap> PredicateMap;