From: Jim Grosbach Date: Fri, 4 Apr 2014 02:11:03 +0000 (+0000) Subject: ARM: Range based for-loop over block predecessors. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2d8a097279d7702e7abb979f87ba8d7dcd8abb20;p=oota-llvm.git ARM: Range based for-loop over block predecessors. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205604 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/Thumb2SizeReduction.cpp b/lib/Target/ARM/Thumb2SizeReduction.cpp index 04b83fbaf52..5b9affa2c6d 100644 --- a/lib/Target/ARM/Thumb2SizeReduction.cpp +++ b/lib/Target/ARM/Thumb2SizeReduction.cpp @@ -921,9 +921,8 @@ bool Thumb2SizeReduce::ReduceMBB(MachineBasicBlock &MBB) { HighLatencyCPSR = false; // Check predecessors for the latest CPSRDef. - for (MachineBasicBlock::pred_iterator - I = MBB.pred_begin(), E = MBB.pred_end(); I != E; ++I) { - const MBBInfo &PInfo = BlockInfo[(*I)->getNumber()]; + for (auto *Pred : MBB.predecessors()) { + const MBBInfo &PInfo = BlockInfo[Pred->getNumber()]; if (!PInfo.Visited) { // Since blocks are visited in RPO, this must be a back-edge. continue;