aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2024-02-21 09:33:19 +0100
committerAldy Hernandez <aldyh@redhat.com>2024-04-28 21:02:59 +0200
commita78dfb0fc83606e9b83b76575deb7e43300254fa (patch)
treee2f54b416bbcfe4e0b5208a8122fd9514070c887
parent21713edf52974d14238cdda865fc662eca58302a (diff)
downloadgcc-a78dfb0fc83606e9b83b76575deb7e43300254fa.zip
gcc-a78dfb0fc83606e9b83b76575deb7e43300254fa.tar.gz
gcc-a78dfb0fc83606e9b83b76575deb7e43300254fa.tar.bz2
Add a virtual vrange destructor.
Richi mentioned in PR113476 that it would be cleaner to move the destructor from int_range to the base class. Although this isn't strictly necessary, as there are no users, it is good to future proof things, and the overall impact is miniscule. gcc/ChangeLog: * value-range.h (vrange::~vrange): New. (int_range::~int_range): Make final override.
-rw-r--r--gcc/value-range.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/value-range.h b/gcc/value-range.h
index e7f6195..b7c8398 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -95,6 +95,7 @@ public:
virtual void set_zero (tree type) = 0;
virtual void set_nonnegative (tree type) = 0;
virtual bool fits_p (const vrange &r) const = 0;
+ virtual ~vrange () { }
bool varying_p () const;
bool undefined_p () const;
@@ -382,7 +383,7 @@ public:
int_range (tree type);
int_range (const int_range &);
int_range (const irange &);
- virtual ~int_range ();
+ ~int_range () final override;
int_range& operator= (const int_range &);
protected:
int_range (tree, tree, value_range_kind = VR_RANGE);