Simplify the DenseMapInfo for `EditEntry` by migrating from
`FoldingSetNodeID` to `llvm::hash_combine`. Besides the cleanup, this
reduces the diff for a future patch which changes the type of one of the
fields.
There should be no real functionality change here, although I imagine
the hash value will churn since its a different hashing infrastructure.
Differential Revision: https://reviews.llvm.org/D92630
return Entry;
}
static unsigned getHashValue(const EditEntry& Val) {
- llvm::FoldingSetNodeID ID;
- ID.AddPointer(Val.File);
- ID.AddInteger(Val.Offset);
- ID.AddInteger(Val.RemoveLen);
- ID.AddString(Val.Text);
- return ID.ComputeHash();
+ return (unsigned)llvm::hash_combine(Val.File, Val.Offset, Val.RemoveLen,
+ Val.Text);
}
static bool isEqual(const EditEntry &LHS, const EditEntry &RHS) {
return LHS.File == RHS.File &&