Skip to content

Commit 42ec993

Browse files
committed
[PowerPC] Fix gcc -Wparentheses warning [NFC]
Without this gcc warns like ../lib/Target/PowerPC/PPCAsmPrinter.cpp:1650:33: warning: suggest parentheses around '&&' within '||' [-Wparentheses] 1650 | (InstDisp >= -32768) && | ~~~~~~~~~~~~~~~~~~~~~^~ 1651 | "Expecting the instruction displacement for local-exec TLS " | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1652 | "variables to be between [-32768, 32768)!"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 parent a52e9ec commit 42ec993

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1646,8 +1646,8 @@ const MCExpr *PPCAsmPrinter::getAdjustedLocalExecExpr(const MachineOperand &MO,
16461646
ptrdiff_t Delta = ((FinalAddress + 32768) & ~0xFFFF);
16471647
// Check that the total instruction displacement fits within [-32768,32768).
16481648
[[maybe_unused]] ptrdiff_t InstDisp = TLSVarAddress + Offset - Delta;
1649-
assert((InstDisp < 32768) ||
1650-
(InstDisp >= -32768) &&
1649+
assert(((InstDisp < 32768) ||
1650+
(InstDisp >= -32768)) &&
16511651
"Expecting the instruction displacement for local-exec TLS "
16521652
"variables to be between [-32768, 32768)!");
16531653
Expr = MCBinaryExpr::createAdd(

0 commit comments

Comments
 (0)