File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 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) {
43994399 if (MakeNewInstruction) {
44004400 LandingPadInst *NLI = LandingPadInst::Create (LI.getType (),
44014401 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 );
44044404 // A landing pad with no clauses must have the cleanup flag set. It is
44054405 // theoretically possible, though highly unlikely, that we eliminated all
44064406 // 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) {
53395339 std::vector<DominatorTree::UpdateType> Updates;
53405340
53415341 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) {
53445343 Instruction *TI = Predecessor->getTerminator ();
53455344 IRBuilder<> Builder (TI);
53465345 if (auto *BI = dyn_cast<BranchInst>(TI)) {
You can’t perform that action at this time.
0 commit comments