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 @@ -1581,22 +1581,16 @@ bool PredTransitions::substituteVariants(const PredTransition &Trans) {
15811581 // Visit each original write sequence.
15821582 for (const auto &WriteSequence : Trans.WriteSequences ) {
15831583 // Push a new (empty) write sequence onto all partial Transitions.
1584- for (std::vector<PredTransition>::iterator I = TransVec.begin () + StartIdx,
1585- E = TransVec.end ();
1586- I != E; ++I) {
1587- I->WriteSequences .emplace_back ();
1588- }
1584+ for (auto &PT : drop_begin (TransVec, StartIdx))
1585+ PT.WriteSequences .emplace_back ();
15891586 Subst |=
15901587 substituteVariantOperand (WriteSequence, /* IsRead=*/ false , StartIdx);
15911588 }
15921589 // Visit each original read sequence.
15931590 for (const auto &ReadSequence : Trans.ReadSequences ) {
15941591 // Push a new (empty) read sequence onto all partial Transitions.
1595- for (std::vector<PredTransition>::iterator I = TransVec.begin () + StartIdx,
1596- E = TransVec.end ();
1597- I != E; ++I) {
1598- I->ReadSequences .emplace_back ();
1599- }
1592+ for (auto &PT : drop_begin (TransVec, StartIdx))
1593+ PT.ReadSequences .emplace_back ();
16001594 Subst |= substituteVariantOperand (ReadSequence, /* IsRead=*/ true , StartIdx);
16011595 }
16021596 return Subst;
You can’t perform that action at this time.
0 commit comments