[ADT] Use small_buckets() in SmallPtrSetImpl::remove_if (NFC) (#153962)

This commit is contained in:
Kazu Hirata 2025-08-16 13:15:36 -07:00 committed by GitHub
parent 75bf739208
commit 1c8da29f48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -435,7 +435,8 @@ public:
bool remove_if(UnaryPredicate P) {
bool Removed = false;
if (isSmall()) {
const void **APtr = CurArray, **E = CurArray + NumEntries;
auto Buckets = small_buckets();
const void **APtr = Buckets.begin(), **E = Buckets.end();
while (APtr != E) {
PtrType Ptr = PtrTraits::getFromVoidPointer(const_cast<void *>(*APtr));
if (P(Ptr)) {