Skip to content

Commit 9e2bb41

Browse files
authored
[ADT][NFC] Remove unused parameter from DenseMap::InsertIntoBucketImpl (#108382)
Remove unused parameter `Key` from `InsertIntoBucketImpl`
1 parent bea2f25 commit 9e2bb41

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/include/llvm/ADT/DenseMap.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ class DenseMapBase : public DebugEpochBase {
570570
template <typename KeyArg, typename... ValueArgs>
571571
BucketT *InsertIntoBucket(BucketT *TheBucket, KeyArg &&Key,
572572
ValueArgs &&...Values) {
573-
TheBucket = InsertIntoBucketImpl(Key, Key, TheBucket);
573+
TheBucket = InsertIntoBucketImpl(Key, TheBucket);
574574

575575
TheBucket->getFirst() = std::forward<KeyArg>(Key);
576576
::new (&TheBucket->getSecond()) ValueT(std::forward<ValueArgs>(Values)...);
@@ -580,16 +580,15 @@ class DenseMapBase : public DebugEpochBase {
580580
template <typename LookupKeyT>
581581
BucketT *InsertIntoBucketWithLookup(BucketT *TheBucket, KeyT &&Key,
582582
ValueT &&Value, LookupKeyT &Lookup) {
583-
TheBucket = InsertIntoBucketImpl(Key, Lookup, TheBucket);
583+
TheBucket = InsertIntoBucketImpl(Lookup, TheBucket);
584584

585585
TheBucket->getFirst() = std::move(Key);
586586
::new (&TheBucket->getSecond()) ValueT(std::move(Value));
587587
return TheBucket;
588588
}
589589

590590
template <typename LookupKeyT>
591-
BucketT *InsertIntoBucketImpl(const KeyT &Key, const LookupKeyT &Lookup,
592-
BucketT *TheBucket) {
591+
BucketT *InsertIntoBucketImpl(const LookupKeyT &Lookup, BucketT *TheBucket) {
593592
incrementEpoch();
594593

595594
// If the load of the hash table is more than 3/4, or if fewer than 1/8 of

0 commit comments

Comments
 (0)