]> granicus.if.org Git - llvm/commitdiff
Fix class SCEVPredicate has virtual functions and accessible non-virtual destructor.
authorAndy Gibbs <andyg1001@hotmail.co.uk>
Thu, 3 Dec 2015 08:20:20 +0000 (08:20 +0000)
committerAndy Gibbs <andyg1001@hotmail.co.uk>
Thu, 3 Dec 2015 08:20:20 +0000 (08:20 +0000)
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
lib/Analysis/ScalarEvolution.cpp

index da8c68aa6832a0dd655266596ee31e82b5b791e9..f674cc7ee56f57ccaeef2a5cd2d7bc92ee897703 100644 (file)
@@ -183,7 +183,7 @@ namespace llvm {
 
   protected:
     SCEVPredicateKind Kind;
-    ~SCEVPredicate() = default;
+    virtual ~SCEVPredicate();
     SCEVPredicate(const SCEVPredicate&) = default;
     SCEVPredicate &operator=(const SCEVPredicate&) = default;
 
index d04028b15e2fa6adc58ce92c61c1636ea5a53128..9a0570d47f024e09de9f63dd8a703c21e2abb0c9 100644 (file)
@@ -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)