[llvm] r363043 - [ARM] Fix unused-variable warning in rL363039.
Simon Tatham via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 11 03:09:12 PDT 2019
Author: statham
Date: Tue Jun 11 03:09:12 2019
New Revision: 363043
URL: http://llvm.org/viewvc/llvm-project?rev=363043&view=rev
Log:
[ARM] Fix unused-variable warning in rL363039.
The variable `OffsetMask` is currently only used in an assertion, so
if assertions are compiled out and -Werror is enabled, it becomes a
build failure.
Modified:
llvm/trunk/lib/Target/ARM/Thumb2InstrInfo.cpp
Modified: llvm/trunk/lib/Target/ARM/Thumb2InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb2InstrInfo.cpp?rev=363043&r1=363042&r2=363043&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Thumb2InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Thumb2InstrInfo.cpp Tue Jun 11 03:09:12 2019
@@ -617,6 +617,7 @@ bool llvm::rewriteT2FrameIndex(MachineIn
// MCInst operand expects already scaled value.
Scale = 1;
assert((Offset & OffsetMask) == 0 && "Can't encode this offset!");
+ (void)OffsetMask; // squash unused-variable warning at -NDEBUG
} else if (AddrMode == ARMII::AddrModeT2_i8s4) {
Offset += MI.getOperand(FrameRegIdx + 1).getImm() * 4;
NumBits = 10; // 8 bits scaled by 4
More information about the llvm-commits
mailing list