mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 16:56:39 +00:00
[clangd] Use our own relation kind.
Summary: Move the RelationKind from Serialization.h to Relation.h. This patch doesn't introduce any breaking changes. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68981 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375117 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2200a32785
commit
c0521e5fc0
@ -67,6 +67,17 @@ template<> struct DenseMapInfo<char> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Provide DenseMapInfo for unsigned chars.
|
||||||
|
template <> struct DenseMapInfo<unsigned char> {
|
||||||
|
static inline unsigned char getEmptyKey() { return ~0; }
|
||||||
|
static inline unsigned char getTombstoneKey() { return ~0 - 1; }
|
||||||
|
static unsigned getHashValue(const unsigned char &Val) { return Val * 37U; }
|
||||||
|
|
||||||
|
static bool isEqual(const unsigned char &LHS, const unsigned char &RHS) {
|
||||||
|
return LHS == RHS;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Provide DenseMapInfo for unsigned shorts.
|
// Provide DenseMapInfo for unsigned shorts.
|
||||||
template <> struct DenseMapInfo<unsigned short> {
|
template <> struct DenseMapInfo<unsigned short> {
|
||||||
static inline unsigned short getEmptyKey() { return 0xFFFF; }
|
static inline unsigned short getEmptyKey() { return 0xFFFF; }
|
||||||
|
Loading…
Reference in New Issue
Block a user