mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
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:
@@ -548,6 +548,14 @@ namespace llvm {
|
||||
template <typename T> struct isPodLike;
|
||||
template <> struct isPodLike<StringRef> { static const bool value = true; };
|
||||
|
||||
template <typename T> struct DenseMapInfo;
|
||||
template<> struct DenseMapInfo<StringRef> {
|
||||
static StringRef getEmptyKey() { return StringRef(); }
|
||||
static StringRef getTombstoneKey() { return StringRef(" ", 0); }
|
||||
static unsigned getHashValue(StringRef const val);
|
||||
static bool isEqual(StringRef const lhs,
|
||||
StringRef const rhs) { return lhs.equals(rhs); }
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user