From ce0413b05c392776df8742f60734c89f35150f59 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256169 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp b/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp index 41c8811ea76..5e7663cdb50 100644 --- a/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp +++ b/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.34.1