mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfo
Add a new DenseMapInfo::isEqual method to allow clients to redefine the equality predicate used when probing the hash table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -203,9 +203,12 @@ namespace {
|
||||
static inline KeyTy getEmptyKey() { return KeyTy(APInt(1,0), 0); }
|
||||
static inline KeyTy getTombstoneKey() { return KeyTy(APInt(1,1), 0); }
|
||||
static unsigned getHashValue(const KeyTy &Key) {
|
||||
return DenseMapKeyInfo<void*>::getHashValue(Key.type) ^
|
||||
return DenseMapInfo<void*>::getHashValue(Key.type) ^
|
||||
Key.val.getHashValue();
|
||||
}
|
||||
static bool isEqual(const KeyTy &LHS, const KeyTy &RHS) {
|
||||
return LHS == RHS;
|
||||
}
|
||||
static bool isPod() { return false; }
|
||||
};
|
||||
}
|
||||
@@ -293,6 +296,9 @@ namespace {
|
||||
static unsigned getHashValue(const KeyTy &Key) {
|
||||
return Key.val.getHashValue();
|
||||
}
|
||||
static bool isEqual(const KeyTy &LHS, const KeyTy &RHS) {
|
||||
return LHS == RHS;
|
||||
}
|
||||
static bool isPod() { return false; }
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user