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 | 2a25359408aabad6cf4b52643c4d07916b305a66 (patch) | |
tree | 50ba40b43753e61ab18f28beb18aa7d05dc18118 /lib | |
parent | fbb2bed0f2c49ff6daf9f0ba4efebd346597f99c (diff) |
use range-based for loop; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index a7f08352870..c2c8cb2a3b4 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/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 |