[llvm] [ADT][NFC] Remove unused parameter from DenseMap::InsertIntoBucketImpl (PR #108382)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 06:01:35 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-adt

Author: Marc Auberer (marcauberer)

<details>
<summary>Changes</summary>

Remove unused parameter `Key` from `InsertIntoBucketImpl`

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


1 Files Affected:

- (modified) llvm/include/llvm/ADT/DenseMap.h (+3-4) 


``````````diff
diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h
index 083d5c9388f7c8..7535eb2dad0200 100644
--- a/llvm/include/llvm/ADT/DenseMap.h
+++ b/llvm/include/llvm/ADT/DenseMap.h
@@ -570,7 +570,7 @@ class DenseMapBase : public DebugEpochBase {
   template <typename KeyArg, typename... ValueArgs>
   BucketT *InsertIntoBucket(BucketT *TheBucket, KeyArg &&Key,
                             ValueArgs &&...Values) {
-    TheBucket = InsertIntoBucketImpl(Key, Key, TheBucket);
+    TheBucket = InsertIntoBucketImpl(Key, TheBucket);
 
     TheBucket->getFirst() = std::forward<KeyArg>(Key);
     ::new (&TheBucket->getSecond()) ValueT(std::forward<ValueArgs>(Values)...);
@@ -580,7 +580,7 @@ class DenseMapBase : public DebugEpochBase {
   template <typename LookupKeyT>
   BucketT *InsertIntoBucketWithLookup(BucketT *TheBucket, KeyT &&Key,
                                       ValueT &&Value, LookupKeyT &Lookup) {
-    TheBucket = InsertIntoBucketImpl(Key, Lookup, TheBucket);
+    TheBucket = InsertIntoBucketImpl(Lookup, TheBucket);
 
     TheBucket->getFirst() = std::move(Key);
     ::new (&TheBucket->getSecond()) ValueT(std::move(Value));
@@ -588,8 +588,7 @@ class DenseMapBase : public DebugEpochBase {
   }
 
   template <typename LookupKeyT>
-  BucketT *InsertIntoBucketImpl(const KeyT &Key, const LookupKeyT &Lookup,
-                                BucketT *TheBucket) {
+  BucketT *InsertIntoBucketImpl(const LookupKeyT &Lookup, BucketT *TheBucket) {
     incrementEpoch();
 
     // If the load of the hash table is more than 3/4, or if fewer than 1/8 of

``````````

</details>


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


More information about the llvm-commits mailing list