g++ 4.7 does not allow an inline defaulted virtual destructor to be overridden,
giving the error "looser throw specifier for ... overridding ~SCEVPredicate()
noexcept (true)" (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53613).
The work-around given in the bug report above has been utilised here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254511
91177308-0d34-0410-b5e6-
96231b3b80d8
protected:
SCEVPredicateKind Kind;
- virtual ~SCEVPredicate() = default;
+ virtual ~SCEVPredicate();
SCEVPredicate(const SCEVPredicate&) = default;
SCEVPredicate &operator=(const SCEVPredicate&) = default;
/// if this is a SCEVUnionPredicate.
virtual const SCEV *getExpr() const = 0;
};
+
+ /// Default destructor must be defined outside class due to g++ PR53613.
+ SCEVPredicate::~SCEVPredicate() = default;
inline raw_ostream &operator<<(raw_ostream &OS, const SCEVPredicate &P) {
P.print(OS);