use range-based for loop; NFCI
authorSanjay Patel <spatel@rotateright.com>
Thu, 10 Sep 2015 16:25:38 +0000 (16:25 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 10 Sep 2015 16:25:38 +0000 (16:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247294 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/SimplifyCFG.cpp

index c2c8cb2a3b4cea6b321e51f571a3eda2464c7554..da20f7e30f768c5534b4b02e0a2b38d5bedbd5c0 100644 (file)
@@ -971,8 +971,8 @@ bool SimplifyCFGOpt::FoldValueComparisonIntoPredecessors(TerminatorInst *TI,
       // Okay, at this point, we know which new successor Pred will get.  Make
       // sure we update the number of entries in the PHI nodes for these
       // successors.
-      for (unsigned i = 0, e = NewSuccessors.size(); i != e; ++i)
-        AddPredecessorToBlock(NewSuccessors[i], Pred, BB);
+      for (BasicBlock *NewSuccessor : NewSuccessors)
+        AddPredecessorToBlock(NewSuccessor, Pred, BB);
 
       Builder.SetInsertPoint(PTI);
       // Convert pointer to int before we switch.