From 6a0423c52ef56d6fc2e0392b91bf22941fdeb0db Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Fri, 2 Oct 2020 10:36:17 +0200 Subject: [PATCH] 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. --- gcc/value-range.h | 1 + 1 file changed, 1 insertion(+) 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. -- 2.30.2