Skip to content

Commit 053c0ad

Browse files
[Mips] Use a range-based for loop (NFC)
1 parent 695b868 commit 053c0ad

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Target/Mips/MipsBranchExpansion.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,8 @@ void MipsBranchExpansion::initMBBInfo() {
299299
MachineBasicBlock *MBB = MFp->getBlockNumbered(I);
300300

301301
// Compute size of MBB.
302-
for (MachineBasicBlock::instr_iterator MI = MBB->instr_begin();
303-
MI != MBB->instr_end(); ++MI)
304-
MBBInfos[I].Size += TII->getInstSizeInBytes(*MI);
302+
for (MachineInstr &MI : MBB->instrs())
303+
MBBInfos[I].Size += TII->getInstSizeInBytes(MI);
305304
}
306305
}
307306

0 commit comments

Comments
 (0)