mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 21:50:40 +00:00
llvm-dwp: Simplify hashing code a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265426 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
503ff5bcee
commit
037ba978f5
@ -288,10 +288,11 @@ writeIndex(MCStreamer &Out, MCSection *Section,
|
||||
for (const auto &P : IndexEntries) {
|
||||
auto S = P.first;
|
||||
auto H = S & Mask;
|
||||
auto HP = ((S >> 32) & Mask) | 1;
|
||||
while (Buckets[H]) {
|
||||
assert(S != IndexEntries.begin()[Buckets[H] - 1].first &&
|
||||
"Duplicate unit");
|
||||
H = (H + (((S >> 32) & Mask) | 1)) % Buckets.size();
|
||||
H = (H + HP) & Mask;
|
||||
}
|
||||
Buckets[H] = i + 1;
|
||||
++i;
|
||||
|
Loading…
Reference in New Issue
Block a user