From f856249d496663b72b9eac37cdabb52932abd0e0 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Mon, 8 Jul 2013 19:17:48 +0000 Subject: StringRef: add DenseMapInfo for StringRef. Remove the implementation in include/llvm/Support/YAMLTraits.h. Added a DenseMap type DITypeHashMap in DebugInfo.h: DenseMap, MDNode*> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185852 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/StringRef.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Support/StringRef.cpp') 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 @@ -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::getHashValue(StringRef const val) { + return llvm::HashString(val); +} -- cgit v1.2.3