diff options
author | River Riddle <riddleriver@gmail.com> | 2021-11-16 17:59:45 +0000 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2021-11-16 18:54:14 +0000 |
commit | 4c484f11d355e4293f7b245a9330f0a1e89630ac (patch) | |
tree | 0e34c61206cb8a6560b4fcd208295b32059f9ea4 /llvm/lib/Support/APInt.cpp | |
parent | c6b9b702a049ba96294f174983016e8b3e11afb0 (diff) | |
download | llvm-4c484f11d355e4293f7b245a9330f0a1e89630ac.zip llvm-4c484f11d355e4293f7b245a9330f0a1e89630ac.tar.gz llvm-4c484f11d355e4293f7b245a9330f0a1e89630ac.tar.bz2 |
[llvm] Add a SFINAE template parameter to DenseMapInfo
This allows for using SFINAE partial specialization for DenseMapInfo.
In MLIR, this is particularly useful as it will allow for defining partial
specializations that support all Attribute, Op, and Type classes without
needing to specialize DenseMapInfo for each individual class.
Differential Revision: https://reviews.llvm.org/D113641
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 52a2099..4940b61 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -569,7 +569,7 @@ hash_code llvm::hash_value(const APInt &Arg) { hash_combine_range(Arg.U.pVal, Arg.U.pVal + Arg.getNumWords())); } -unsigned DenseMapInfo<APInt>::getHashValue(const APInt &Key) { +unsigned DenseMapInfo<APInt, void>::getHashValue(const APInt &Key) { return static_cast<unsigned>(hash_value(Key)); } |