From: Aldy Hernandez Date: Fri, 2 Oct 2020 08:36:17 +0000 (+0200) Subject: Implement irange::fits_p. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a0423c52ef56d6fc2e0392b91bf22941fdeb0db;p=gcc.git 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. --- diff --git a/gcc/value-range.h b/gcc/value-range.h index c875e713d65..94b48e55e77 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.