From: Dan Gohman Date: Mon, 21 Dec 2015 17:22:02 +0000 (+0000) Subject: [WebAssembly] Convert a regular for loop to a range-based for loop. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=ce0413b05c392776df8742f60734c89f35150f59 [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 --- 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.