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*>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185852 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren
2013-07-08 19:17:48 +00:00
parent 7426a3b588
commit f856249d49
4 changed files with 18 additions and 9 deletions

View File

@ -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);
}