[llvm] [ADT] DenseMapInfo<unsigned long>::getHashValue - avoid MSVC out of bounds shift warning (PR #96173)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 20 04:45:49 PDT 2024
================
@@ -142,7 +142,7 @@ template<> struct DenseMapInfo<unsigned long> {
if constexpr (sizeof(Val) == 4)
return DenseMapInfo<unsigned>::getHashValue(Val);
else
- return detail::combineHashValue(Val >> 32, Val);
+ return detail::combineHashValue(Val >> (4 * sizeof(Val)), Val);
----------------
RKSimon wrote:
Sure, I'll update it in a sec (sorry don't know this code very well at all)
https://github.com/llvm/llvm-project/pull/96173
More information about the llvm-commits
mailing list