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

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


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-adt

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

The updated value isn't used.


---
Full diff: https://github.com/llvm/llvm-project/pull/155975.diff


1 Files Affected:

- (modified) llvm/include/llvm/ADT/DenseMap.h (-1) 


``````````diff
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)) {

``````````

</details>


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


More information about the llvm-commits mailing list