File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
llvm/utils/TableGen/Common Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -1590,22 +1590,16 @@ bool PredTransitions::substituteVariants(const PredTransition &Trans) {
15901590 // Visit each original write sequence.
15911591 for (const auto &WriteSequence : Trans.WriteSequences ) {
15921592 // Push a new (empty) write sequence onto all partial Transitions.
1593- for (std::vector<PredTransition>::iterator I = TransVec.begin () + StartIdx,
1594- E = TransVec.end ();
1595- I != E; ++I) {
1596- I->WriteSequences .emplace_back ();
1597- }
1593+ for (auto &PT : drop_begin (TransVec, StartIdx))
1594+ PT.WriteSequences .emplace_back ();
15981595 Subst |=
15991596 substituteVariantOperand (WriteSequence, /* IsRead=*/ false , StartIdx);
16001597 }
16011598 // Visit each original read sequence.
16021599 for (const auto &ReadSequence : Trans.ReadSequences ) {
16031600 // Push a new (empty) read sequence onto all partial Transitions.
1604- for (std::vector<PredTransition>::iterator I = TransVec.begin () + StartIdx,
1605- E = TransVec.end ();
1606- I != E; ++I) {
1607- I->ReadSequences .emplace_back ();
1608- }
1601+ for (auto &PT : drop_begin (TransVec, StartIdx))
1602+ PT.ReadSequences .emplace_back ();
16091603 Subst |= substituteVariantOperand (ReadSequence, /* IsRead=*/ true , StartIdx);
16101604 }
16111605 return Subst;
You can’t perform that action at this time.
0 commit comments