projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbb2bed
)
use range-based for loop; NFCI
author
Sanjay Patel
<spatel@rotateright.com>
Thu, 10 Sep 2015 16:15:21 +0000
(16:15 +0000)
committer
Sanjay Patel
<spatel@rotateright.com>
Thu, 10 Sep 2015 16:15:21 +0000
(16:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247293
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/SimplifyCFG.cpp
b/lib/Transforms/Utils/SimplifyCFG.cpp
index a7f08352870918fb5d79e01e324ba0cab101ceff..c2c8cb2a3b4cea6b321e51f571a3eda2464c7554 100644
(file)
--- 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