diff options
author | Manman Ren <mren@apple.com> | 2013-07-08 19:17:48 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-07-08 19:17:48 +0000 |
commit | c6fe5bc77c7b19075938131c38d12a82dd5cfbda (patch) | |
tree | 63930d57cd405487246f53696ce18a4b37232698 /llvm/lib/Support/StringRef.cpp | |
parent | a70ad5fb9bed75944e151da5d89f3849cd9b4722 (diff) | |
download | bcm5719-llvm-c6fe5bc77c7b19075938131c38d12a82dd5cfbda.tar.gz bcm5719-llvm-c6fe5bc77c7b19075938131c38d12a82dd5cfbda.zip |
StringRef: add DenseMapInfo for StringRef.
Remove the implementation in include/llvm/Support/YAMLTraits.h.
Added a DenseMap type DITypeHashMap in DebugInfo.h:
DenseMap<std::pair<StringRef, unsigned>, MDNode*>
llvm-svn: 185852
Diffstat (limited to 'llvm/lib/Support/StringRef.cpp')
-rw-r--r-- | llvm/lib/Support/StringRef.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/StringRef.cpp b/llvm/lib/Support/StringRef.cpp index d7a0bfa4100..c0f366cb3e5 100644 --- a/llvm/lib/Support/StringRef.cpp +++ b/llvm/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); +} |