[llvm] r247293 - use range-based for loop; NFCI
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 09:15:21 PDT 2015
Author: spatel
Date: Thu Sep 10 11:15:21 2015
New Revision: 247293
URL: http://llvm.org/viewvc/llvm-project?rev=247293&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=247293&r1=247292&r2=247293&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Thu Sep 10 11:15:21 2015
@@ -985,8 +985,8 @@ bool SimplifyCFGOpt::FoldValueComparison
SwitchInst *NewSI = Builder.CreateSwitch(CV, PredDefault,
PredCases.size());
NewSI->setDebugLoc(PTI->getDebugLoc());
- for (unsigned i = 0, e = PredCases.size(); i != e; ++i)
- NewSI->addCase(PredCases[i].Value, PredCases[i].Dest);
+ for (ValueEqualityComparisonCase &V : PredCases)
+ NewSI->addCase(V.Value, V.Dest);
if (PredHasWeights || SuccHasWeights) {
// Halve the weights if any of them cannot fit in an uint32_t
More information about the llvm-commits
mailing list