[llvm] [ADT] Remove a set-but-unused variable in findBucketForInsertion (NFC) (PR #155975)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 22:18:18 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/155975

The updated value isn't used.


>From c3ab47e459ad4836b5052dc99f2fae27a8cb3391 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 26 Aug 2025 16:23:22 -0700
Subject: [PATCH] [ADT] Remove a set-but-unused variable in
 findBucketForInsertion (NFC)

The updated value isn't used.
---
 llvm/include/llvm/ADT/DenseMap.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h
index c44706a597fa6..0d2d1d7d83bbd 100644
--- a/llvm/include/llvm/ADT/DenseMap.h
+++ b/llvm/include/llvm/ADT/DenseMap.h
@@ -582,7 +582,6 @@ class DenseMapBase : public DebugEpochBase {
     if (LLVM_UNLIKELY(NewNumEntries * 4 >= NumBuckets * 3)) {
       this->grow(NumBuckets * 2);
       LookupBucketFor(Lookup, TheBucket);
-      NumBuckets = getNumBuckets();
     } else if (LLVM_UNLIKELY(NumBuckets -
                                  (NewNumEntries + getNumTombstones()) <=
                              NumBuckets / 8)) {



More information about the llvm-commits mailing list