[llvm] r252537 - Fix -Wdeprecated warnings due to the use of copy ops on SCEVPredicate derived class objects
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 9 15:30:15 PST 2015
Author: dblaikie
Date: Mon Nov 9 17:30:15 2015
New Revision: 252537
URL: http://llvm.org/viewvc/llvm-project?rev=252537&view=rev
Log:
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
Modified:
llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=252537&r1=252536&r2=252537&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Mon Nov 9 17:30:15 2015
@@ -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;
More information about the llvm-commits
mailing list