mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Allow unsigned long long DenseMapInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80118 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -84,6 +84,20 @@ template<> struct DenseMapInfo<unsigned long> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Provide DenseMapInfo for unsigned long longs.
|
||||||
|
template<> struct DenseMapInfo<unsigned long long> {
|
||||||
|
static inline unsigned long long getEmptyKey() { return ~0LL; }
|
||||||
|
static inline unsigned long long getTombstoneKey() { return ~0LL - 1LL; }
|
||||||
|
static unsigned getHashValue(const unsigned long long& Val) {
|
||||||
|
return (unsigned)(Val * 37LL);
|
||||||
|
}
|
||||||
|
static bool isPod() { return true; }
|
||||||
|
static bool isEqual(const unsigned long long& LHS,
|
||||||
|
const unsigned long long& RHS) {
|
||||||
|
return LHS == RHS;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Provide DenseMapInfo for all pairs whose members have info.
|
// Provide DenseMapInfo for all pairs whose members have info.
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
struct DenseMapInfo<std::pair<T, U> > {
|
struct DenseMapInfo<std::pair<T, U> > {
|
||||||
|
Reference in New Issue
Block a user