[CodeGen] Use a range-based for loop (NFC)

This commit is contained in:
Kazu Hirata 2022-06-04 22:26:55 -07:00
parent 8cc9fa6f78
commit bcf4fa458a
1 changed files with 1 additions and 2 deletions

View File

@ -1810,8 +1810,7 @@ void SwingSchedulerDAG::addConnectedNodes(SUnit *SU, NodeSet &NewSet,
static bool isIntersect(SmallSetVector<SUnit *, 8> &Set1, const NodeSet &Set2,
SmallSetVector<SUnit *, 8> &Result) {
Result.clear();
for (unsigned i = 0, e = Set1.size(); i != e; ++i) {
SUnit *SU = Set1[i];
for (SUnit *SU : Set1) {
if (Set2.count(SU) != 0)
Result.insert(SU);
}