[llvm] 0ea54be - [ADT] Mark BitVector::find_prev_unset const (NFC) (#156272)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 31 23:43:31 PDT 2025
Author: Kazu Hirata
Date: 2025-08-31T23:43:27-07:00
New Revision: 0ea54be66bd7333a80ec49d2b95e09c15391c7b0
URL: https://github.com/llvm/llvm-project/commit/0ea54be66bd7333a80ec49d2b95e09c15391c7b0
DIFF: https://github.com/llvm/llvm-project/commit/0ea54be66bd7333a80ec49d2b95e09c15391c7b0.diff
LOG: [ADT] Mark BitVector::find_prev_unset const (NFC) (#156272)
find_prev_unset calls find_last_unset_in, a const method, but
find_prev_unset itself isn't marked const.
Added:
Modified:
llvm/include/llvm/ADT/BitVector.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/BitVector.h b/llvm/include/llvm/ADT/BitVector.h
index 70de4c239c1c7..1fbce1a95fb76 100644
--- a/llvm/include/llvm/ADT/BitVector.h
+++ b/llvm/include/llvm/ADT/BitVector.h
@@ -327,7 +327,7 @@ class BitVector {
/// find_prev_unset - Returns the index of the first unset bit that precedes
/// the bit at \p PriorTo. Returns -1 if all previous bits are set.
- int find_prev_unset(unsigned PriorTo) {
+ int find_prev_unset(unsigned PriorTo) const {
return find_last_unset_in(0, PriorTo);
}
More information about the llvm-commits
mailing list