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.
This commit is contained in:
Aldy Hernandez 2020-10-02 10:36:17 +02:00
parent 6c2675fa2b
commit 6a0423c52e

View file

@ -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.