diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index df497d37d76..9a66c8b6c11 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -58,7 +58,9 @@ template<> struct DenseMapInfo { template<> struct DenseMapInfo { static inline unsigned long getEmptyKey() { return ~0L; } static inline unsigned long getTombstoneKey() { return ~0L - 1L; } - static unsigned getHashValue(const unsigned long& Val) { return Val * 37L; } + static unsigned getHashValue(const unsigned long& Val) { + return (unsigned)(Val * 37L); + } static bool isPod() { return true; } static bool isEqual(const unsigned long& LHS, const unsigned long& RHS) { return LHS == RHS;