Skip to content

Commit

Permalink
Add parentheses around arithmetic in operand of '|'.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
d0k committed Feb 18, 2016
1 parent e9afeb0 commit 1af94fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/llvm-dwp/llvm-dwp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1af94fd

Please sign in to comment.