From d544e0c100609594aa18563a1ae4f1cb4c7ad12a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 21 Dec 2015 17:22:02 +0000 Subject: [PATCH] [WebAssembly] Convert a regular for loop to a range-based for loop. llvm-svn: 256169 --- llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp index 41c8811..5e7663c 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp @@ -66,8 +66,7 @@ bool WebAssemblyInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, SmallVectorImpl &Cond, bool /*AllowModify*/) const { bool HaveCond = false; - for (MachineInstr &MI : iterator_range( - MBB.getFirstInstrTerminator(), MBB.instr_end())) { + for (MachineInstr &MI : MBB.terminators()) { switch (MI.getOpcode()) { default: // Unhandled instruction; bail out. -- 2.7.4