Fix -Wdeprecated warnings due to the use of copy ops on SCEVPredicate derived class...
[oota-llvm.git] / include / llvm / Analysis / ScalarEvolution.h
index 1bd7fd0db55b28635f289cf997d2d802fbfbe277..9db3a058837ed7bf3515c002d9e5cbe84a2afa56 100644 (file)
@@ -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<const SCEV *, SmallVector<const SCEVPredicate *, 4>>
         PredicateMap;