[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
diff --git a/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp b/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp
index 58cc9b9..316b783 100644
--- a/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp
+++ b/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp
@@ -145,10 +145,9 @@
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);