Add parentheses around arithmetic in operand of '|'.

This avoids a operator precedence warning for mixing + and | in an
expression. I checked that this matches the definition in the Split
DWARF proposal.

Patch by Cong Liu!

Differential Revision: http://reviews.llvm.org/D17375

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261207 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2016-02-18 13:23:17 +00:00
parent e9afeb0bd1
commit 1af94fd91c

View File

@ -238,7 +238,7 @@ static void writeIndex(MCStreamer &Out, MCSection *Section,
while (Buckets[H]) {
assert(S != IndexEntries[Buckets[H] - 1].Signature &&
"Duplicate type unit");
H = (H + ((S >> 32) & Mask) | 1) % Buckets.size();
H = (H + (((S >> 32) & Mask) | 1)) % Buckets.size();
}
Buckets[H] = i + 1;
}