projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c2675f
)
Implement irange::fits_p.
author
Aldy Hernandez
<aldyh@redhat.com>
Fri, 2 Oct 2020 08:36:17 +0000
(10:36 +0200)
committer
Aldy Hernandez
<aldyh@redhat.com>
Fri, 2 Oct 2020 08:36:17 +0000
(10:36 +0200)
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
patch
|
blob
|
history
diff --git
a/gcc/value-range.h
b/gcc/value-range.h
index c875e713d6524bcf0934e21a9f3c8496b280843b..94b48e55e778cd6842ee080b7c55fa260ac64801 100644
(file)
--- 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.