summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp5
1 files changed, 2 insertions, 3 deletions
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);
OpenPOWER on IntegriCloud