From 390adc38fc112be360bd15499e5241bf4e675b6f Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 27 Jan 2022 23:17:16 +0100 Subject: Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-14-init-17616-g024a1fab5c35. PR: 261742 MFC after: 2 weeks (cherry picked from commit 04eeddc0aa8e0a417a16eaf9d7d095207f4a8623) --- contrib/llvm-project/llvm/lib/Support/StringRef.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'contrib/llvm-project/llvm/lib/Support/StringRef.cpp') diff --git a/contrib/llvm-project/llvm/lib/Support/StringRef.cpp b/contrib/llvm-project/llvm/lib/Support/StringRef.cpp index 652303fdb6a0..3ed08ed38661 100644 --- a/contrib/llvm-project/llvm/lib/Support/StringRef.cpp +++ b/contrib/llvm-project/llvm/lib/Support/StringRef.cpp @@ -597,3 +597,11 @@ bool StringRef::getAsDouble(double &Result, bool AllowInexact) const { hash_code llvm::hash_value(StringRef S) { return hash_combine_range(S.begin(), S.end()); } + +unsigned DenseMapInfo::getHashValue(StringRef Val) { + assert(Val.data() != getEmptyKey().data() && + "Cannot hash the empty key!"); + assert(Val.data() != getTombstoneKey().data() && + "Cannot hash the tombstone key!"); + return (unsigned)(hash_value(Val)); +} -- cgit v1.2.3