summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp
diff options
context:
space:
mode:
authorDylan McKay <dylanmckay34@gmail.com>2016-11-19 01:14:44 +0000
committerDylan McKay <dylanmckay34@gmail.com>2016-11-19 01:14:44 +0000
commit19270f3438d1617c16ddeb421fd5ca5a31dff983 (patch)
treed7362dfe210f741d8ea70e4ed702d5a01710e553 /llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp
parent074d46d55fe27d12af5bdfa880408e93a98e874d (diff)
downloadbcm5719-llvm-19270f3438d1617c16ddeb421fd5ca5a31dff983.tar.gz
bcm5719-llvm-19270f3438d1617c16ddeb421fd5ca5a31dff983.zip
[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
Diffstat (limited to 'llvm/lib/Target/AVR/InstPrinter/AVRInstPrinter.cpp')
-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