diff options
Diffstat (limited to 'lib/Support/StringRef.cpp')
-rw-r--r-- | lib/Support/StringRef.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Support/StringRef.cpp b/lib/Support/StringRef.cpp index d7a0bfa410..c0f366cb3e 100644 --- a/lib/Support/StringRef.cpp +++ b/lib/Support/StringRef.cpp @@ -11,6 +11,7 @@ #include "llvm/ADT/APInt.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/OwningPtr.h" +#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/edit_distance.h" #include <bitset> @@ -465,3 +466,7 @@ bool StringRef::getAsInteger(unsigned Radix, APInt &Result) const { hash_code llvm::hash_value(StringRef S) { return hash_combine_range(S.begin(), S.end()); } + +unsigned DenseMapInfo<StringRef>::getHashValue(StringRef const val) { + return llvm::HashString(val); +} |