From: Sanjay Patel Date: Thu, 10 Sep 2015 16:25:38 +0000 (+0000) Subject: use range-based for loop; NFCI X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=64714eab1588974a74870ef1dcf5994d38da019c;p=oota-llvm.git use range-based for loop; NFCI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247294 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index c2c8cb2a3b4..da20f7e30f7 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -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.