Skip to content

Commit

Permalink
[CodeGen] Add begin-end iterators to MachineInstr
Browse files Browse the repository at this point in the history
Convert iteration over operands to range-loop.

Reviewed by: @rovka, @echristo
Differential Revision: https://reviews.llvm.org/D35419

llvm-svn: 308173
  • Loading branch information
javedabsar committed Jul 17, 2017
1 parent 1684317 commit dd2c29e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions llvm/lib/Target/ARM/ARMMCInstLower.cpp
Expand Up @@ -153,9 +153,7 @@ void llvm::LowerARMMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
break;
}

for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = MI->getOperand(i);

for (const MachineOperand &MO : MI->operands()) {
MCOperand MCOp;
if (AP.lowerOperand(MO, MCOp)) {
if (MCOp.isImm() && EncodeImms) {
Expand Down

0 comments on commit dd2c29e

Please sign in to comment.