[llvm] 41cce3b - [ADT] Remove DenseMapBase::getHashValue (NFC) (#161123)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 29 07:54:36 PDT 2025
Author: Kazu Hirata
Date: 2025-09-29T07:54:32-07:00
New Revision: 41cce3b92efe7ec41df1ed757d5d037f6f0a8421
URL: https://github.com/llvm/llvm-project/commit/41cce3b92efe7ec41df1ed757d5d037f6f0a8421
DIFF: https://github.com/llvm/llvm-project/commit/41cce3b92efe7ec41df1ed757d5d037f6f0a8421.diff
LOG: [ADT] Remove DenseMapBase::getHashValue (NFC) (#161123)
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.
Added:
Modified:
llvm/include/llvm/ADT/DenseMap.h
Removed:
################################################################################
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);
More information about the llvm-commits
mailing list