Skip to content

Commit 2b8efe1

Browse files
[ADT] Use small_buckets() in SmallPtrSetImpl::remove_if (NFC)
1 parent 373206d commit 2b8efe1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/include/llvm/ADT/SmallPtrSet.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,8 @@ class SmallPtrSetImpl : public SmallPtrSetImplBase {
435435
bool remove_if(UnaryPredicate P) {
436436
bool Removed = false;
437437
if (isSmall()) {
438-
const void **APtr = CurArray, **E = CurArray + NumEntries;
438+
auto Buckets = small_buckets();
439+
const void **APtr = Buckets.begin(), **E = Buckets.end();
439440
while (APtr != E) {
440441
PtrType Ptr = PtrTraits::getFromVoidPointer(const_cast<void *>(*APtr));
441442
if (P(Ptr)) {

0 commit comments

Comments
 (0)