diff options
author | Richard Biener <rguenther@suse.de> | 2021-11-03 09:57:21 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-11-03 11:14:22 +0100 |
commit | 73658e70d9edfab77d7a50039b3ab7d2be3a41a0 (patch) | |
tree | 26611a8c718cb2a5f85dad791ec899723e4a294f /gcc/bitmap.c | |
parent | c081d0a3b0291297f04a05c833d2ffa8de3a7a1a (diff) | |
download | gcc-73658e70d9edfab77d7a50039b3ab7d2be3a41a0.zip gcc-73658e70d9edfab77d7a50039b3ab7d2be3a41a0.tar.gz gcc-73658e70d9edfab77d7a50039b3ab7d2be3a41a0.tar.bz2 |
Make sbitmap bitmap_set_bit and bitmap_clear_bit return changed state
The following adjusts the sbitmap bitmap_set_bit and bitmap_clear_bit
APIs to match that of bitmap by returning a bool indicating whether
the bitmap was changed. I've also changed bitmap_bit_p to return
a bool rather than an int and made use of the sbitmap bitmap_set_bit
API change in one place.
2021-11-03 Richard Biener <rguenther@suse.de>
* bitmap.h (bitmap_bit_p): Change the return type to bool.
* bitmap.c (bitmap_bit_p): Likewise.
* sbitmap.h (bitmap_bit_p): Likewise.
(bitmap_set_bit): Return whether the bit changed.
(bitmap_clear_bit): Likewise.
* tree-ssa.c (verify_vssa): Make use of the changed state
from bitmap_set_bit.
Diffstat (limited to 'gcc/bitmap.c')
-rw-r--r-- | gcc/bitmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c index 98c6d0b..1aa8e4b 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -983,7 +983,7 @@ bitmap_set_bit (bitmap head, int bit) /* Return whether a bit is set within a bitmap. */ -int +bool bitmap_bit_p (const_bitmap head, int bit) { unsigned int indx = bit / BITMAP_ELEMENT_ALL_BITS; |