From e95d304fd362e68e985c9624ce5503099f63a3ee Mon Sep 17 00:00:00 2001 From: Andy Gibbs Date: Thu, 3 Dec 2015 08:20:20 +0000 Subject: [PATCH] Fix class SCEVPredicate has virtual functions and accessible non-virtual destructor. It is not enough to simply make the destructor virtual since there is a g++ 4.7 issue (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53613) that throws the error "looser throw specifier for ... overridding ~SCEVPredicate() noexcept". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254592 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/ScalarEvolution.h | 2 +- lib/Analysis/ScalarEvolution.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index da8c68aa683..f674cc7ee56 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -183,7 +183,7 @@ namespace llvm { protected: SCEVPredicateKind Kind; - ~SCEVPredicate() = default; + virtual ~SCEVPredicate(); SCEVPredicate(const SCEVPredicate&) = default; SCEVPredicate &operator=(const SCEVPredicate&) = default; diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index d04028b15e2..9a0570d47f0 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -9643,6 +9643,8 @@ SCEVPredicate::SCEVPredicate(const FoldingSetNodeIDRef ID, SCEVPredicateKind Kind) : FastID(ID), Kind(Kind) {} +SCEVPredicate::~SCEVPredicate() {} + SCEVEqualPredicate::SCEVEqualPredicate(const FoldingSetNodeIDRef ID, const SCEVUnknown *LHS, const SCEVConstant *RHS) -- 2.11.0