File tree 2 files changed +3
-4
lines changed
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -4399,8 +4399,8 @@ Instruction *InstCombinerImpl::visitLandingPadInst(LandingPadInst &LI) {
4399
4399
if (MakeNewInstruction) {
4400
4400
LandingPadInst *NLI = LandingPadInst::Create (LI.getType (),
4401
4401
NewClauses.size ());
4402
- for (unsigned i = 0 , e = NewClauses. size (); i != e; ++i )
4403
- NLI->addClause (NewClauses[i] );
4402
+ for (Constant *C : NewClauses)
4403
+ NLI->addClause (C );
4404
4404
// A landing pad with no clauses must have the cleanup flag set. It is
4405
4405
// theoretically possible, though highly unlikely, that we eliminated all
4406
4406
// clauses. If so, force the cleanup flag to true.
Original file line number Diff line number Diff line change @@ -5339,8 +5339,7 @@ bool SimplifyCFGOpt::simplifyUnreachable(UnreachableInst *UI) {
5339
5339
std::vector<DominatorTree::UpdateType> Updates;
5340
5340
5341
5341
SmallSetVector<BasicBlock *, 8 > Preds (pred_begin (BB), pred_end (BB));
5342
- for (unsigned i = 0 , e = Preds.size (); i != e; ++i) {
5343
- auto *Predecessor = Preds[i];
5342
+ for (BasicBlock *Predecessor : Preds) {
5344
5343
Instruction *TI = Predecessor->getTerminator ();
5345
5344
IRBuilder<> Builder (TI);
5346
5345
if (auto *BI = dyn_cast<BranchInst>(TI)) {
You can’t perform that action at this time.
0 commit comments