diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2020-10-02 10:36:17 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2020-10-02 10:36:17 +0200 |
commit | 6a0423c52ef56d6fc2e0392b91bf22941fdeb0db (patch) | |
tree | 4d4e2447df085ec55450896565dac2bcba9528dd /gcc | |
parent | 6c2675fa2bbcfe37308af593edb18e2c1c8eabf0 (diff) | |
download | gcc-6a0423c52ef56d6fc2e0392b91bf22941fdeb0db.zip gcc-6a0423c52ef56d6fc2e0392b91bf22941fdeb0db.tar.gz gcc-6a0423c52ef56d6fc2e0392b91bf22941fdeb0db.tar.bz2 |
Implement irange::fits_p.
This should have been included in the irange_allocator patch, as
a method to see if the current object can hold a passed range
without truncation.
gcc/ChangeLog:
* value-range.h (irange::fits_p): New.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/value-range.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/value-range.h b/gcc/value-range.h index c875e71..94b48e5 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -81,6 +81,7 @@ public: bool operator!= (const irange &r) const { return !(*this == r); } // Misc methods. + bool fits_p (const irange &r) { return m_max_ranges >= r.num_pairs (); } void dump (FILE * = stderr) const; // Deprecated legacy public methods. |