diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp index ad8472c436ab..5d72428f1aec 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp +++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp @@ -272,7 +272,7 @@ public: }; // Map of the preferred location for each value. - std::map ValueToLoc; + DenseMap ValueToLoc; ActiveMLocs.reserve(VLocs.size()); ActiveVLocs.reserve(VLocs.size()); diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h index 6423ff74b563..9e9c0ce394fd 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h +++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h @@ -1082,7 +1082,9 @@ template <> struct DenseMapInfo { return ValueIDNum::TombstoneValue; } - static unsigned getHashValue(const ValueIDNum &Val) { return Val.asU64(); } + static unsigned getHashValue(const ValueIDNum &Val) { + return hash_value(Val.asU64()); + } static bool isEqual(const ValueIDNum &A, const ValueIDNum &B) { return A == B;