From 19270f3438d1617c16ddeb421fd5ca5a31dff983 Mon Sep 17 00:00:00 2001 From: Dylan McKay Date: Sat, 19 Nov 2016 01:14:44 +0000 Subject: [AVR] Remove a variable which was unused in release mode In release mode where assertions are not enabled, this caused an 'unused variable' warning. llvm-svn: 287414 --- llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp b/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp index 58cc9b9ec13..316b7836df0 100644 --- a/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp +++ b/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp @@ -145,10 +145,9 @@ void AVRInstPrinter::printPCRelImm(const MCInst *MI, unsigned OpNo, 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); -- cgit v1.2.3