[llvm] [ADT] Remove DenseMapBase::getHashValue (NFC) (PR #161123)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 28 21:12:27 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-adt
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
This patch removes:
static unsigned getHashValue(const KeyT &Val) {
return KeyInfoT::getHashValue(Val);
}
This function is redundant given the templated overload:
template <typename LookupKeyT>
static unsigned getHashValue(const LookupKeyT &Val) {
return KeyInfoT::getHashValue(Val);
}
Note that the callers doFind and LookupBucketFor are themselves
templated on LookupKeyT.
---
Full diff: https://github.com/llvm/llvm-project/pull/161123.diff
1 Files Affected:
- (modified) llvm/include/llvm/ADT/DenseMap.h (-4)
``````````diff
diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h
index bcf3e9676a7b5..4bda50f5a5cc0 100644
--- a/llvm/include/llvm/ADT/DenseMap.h
+++ b/llvm/include/llvm/ADT/DenseMap.h
@@ -440,10 +440,6 @@ class DenseMapBase : public DebugEpochBase {
}
}
- static unsigned getHashValue(const KeyT &Val) {
- return KeyInfoT::getHashValue(Val);
- }
-
template <typename LookupKeyT>
static unsigned getHashValue(const LookupKeyT &Val) {
return KeyInfoT::getHashValue(Val);
``````````
</details>
https://github.com/llvm/llvm-project/pull/161123
More information about the llvm-commits
mailing list