[WebAssembly] Convert a regular for loop to a range-based for loop.
[oota-llvm.git] / lib / Target / WebAssembly / WebAssemblyInstrInfo.cpp
index 41c8811ea761c4c81fb9f10a7c6021bfe598781d..5e7663cdb5063f7190a4e966e71bfce47b04da38 100644 (file)
@@ -66,8 +66,7 @@ bool WebAssemblyInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
                                          SmallVectorImpl<MachineOperand> &Cond,
                                          bool /*AllowModify*/) const {
   bool HaveCond = false;
-  for (MachineInstr &MI : iterator_range<MachineBasicBlock::instr_iterator>(
-           MBB.getFirstInstrTerminator(), MBB.instr_end())) {
+  for (MachineInstr &MI : MBB.terminators()) {
     switch (MI.getOpcode()) {
     default:
       // Unhandled instruction; bail out.