[llvm] [ADT] DenseMapInfo<unsigned long>::getHashValue - avoid MSVC out of bounds shift warning (PR #96173)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 04:48:53 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);
----------------
nikic wrote:

Could you please also update this for the unsigned long long case, just so the code is the same?

https://github.com/llvm/llvm-project/pull/96173


More information about the llvm-commits mailing list