[llvm] r247294 - use range-based for loop; NFCI
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 09:25:38 PDT 2015
Author: spatel
Date: Thu Sep 10 11:25:38 2015
New Revision: 247294
URL: http://llvm.org/viewvc/llvm-project?rev=247294&view=rev
Log:
use range-based for loop; NFCI
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=247294&r1=247293&r2=247294&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Thu Sep 10 11:25:38 2015
@@ -971,8 +971,8 @@ bool SimplifyCFGOpt::FoldValueComparison
// 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.
More information about the llvm-commits
mailing list