Modifies the DenseMapInfo<SymbolStringPtr>::getHashValue method to take its
argument by const-ref rather than by value (to avoid unnecessary ref-counting
operations) and to defer to DenseMapInfo<void*> for the hash value computation
(since SymbolStringPtrs are just pointers under the hood).
llvm-svn: 360831
return orc::SymbolStringPtr(&orc::SymbolStringPtr::Tombstone);
}
- static unsigned getHashValue(orc::SymbolStringPtr V) {
- uintptr_t IV = reinterpret_cast<uintptr_t>(V.S);
- return unsigned(IV) ^ unsigned(IV >> 9);
+ static unsigned getHashValue(const orc::SymbolStringPtr &V) {
+ return DenseMapInfo<const void *>::getHashValue(V.S);
}
static bool isEqual(const orc::SymbolStringPtr &LHS,