[llvm] r287414 - [AVR] Remove a variable which was unused in release mode
Dylan McKay via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 17:14:44 PST 2016
Author: dylanmckay
Date: Fri Nov 18 19:14:44 2016
New Revision: 287414
URL: http://llvm.org/viewvc/llvm-project?rev=287414&view=rev
Log:
[AVR] Remove a variable which was unused in release mode
In release mode where assertions are not enabled, this caused an 'unused
variable' warning.
Modified:
llvm/trunk/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp
Modified: llvm/trunk/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp?rev=287414&r1=287413&r2=287414&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp Fri Nov 18 19:14:44 2016
@@ -145,10 +145,9 @@ void AVRInstPrinter::printPCRelImm(const
void AVRInstPrinter::printMemri(const MCInst *MI, unsigned OpNo,
raw_ostream &O) {
- const MCOperand &RegOp = MI->getOperand(OpNo);
- const MCOperand &OffsetOp = MI->getOperand(OpNo + 1);
+ assert(MI->getOperand(OpNo).isReg() && "Expected a register for the first operand");
- assert(RegOp.isReg() && "Expected a register");
+ const MCOperand &OffsetOp = MI->getOperand(OpNo + 1);
// Print the register.
printOperand(MI, OpNo, O);
More information about the llvm-commits
mailing list