[WebAssembly] Convert a regular for loop to a range-based for loop.
authorDan Gohman <dan433584@gmail.com>
Mon, 21 Dec 2015 17:22:02 +0000 (17:22 +0000)
committerDan Gohman <dan433584@gmail.com>
Mon, 21 Dec 2015 17:22:02 +0000 (17:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256169 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp

index 41c8811..5e7663c 100644 (file)
@@ -66,8 +66,7 @@ bool WebAssemblyInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,
                                          SmallVectorImpl<MachineOperand> &Cond,
                                          bool /*AllowModify*/) const {
   bool HaveCond = false;
                                          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.
     switch (MI.getOpcode()) {
     default:
       // Unhandled instruction; bail out.