diff options
author | Sanjay Patel <spatel@rotateright.com> | 2015-09-10 16:15:21 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2015-09-10 16:15:21 +0000 |
commit | 5e7bd91891a36d5639938a766e2ea5a128029085 (patch) | |
tree | f421c7360486ce4fb5f79dfc51f48d0045e18907 /llvm/lib/Transforms | |
parent | 1abc48ee58b5b23b84161f980a20cd50ce76fedc (diff) | |
download | bcm5719-llvm-5e7bd91891a36d5639938a766e2ea5a128029085.tar.gz bcm5719-llvm-5e7bd91891a36d5639938a766e2ea5a128029085.zip |
use range-based for loop; NFCI
llvm-svn: 247293
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index a7f08352870..c2c8cb2a3b4 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -985,8 +985,8 @@ bool SimplifyCFGOpt::FoldValueComparisonIntoPredecessors(TerminatorInst *TI, 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 |