Skip to content

Commit 2eabcb7

Browse files
committed
[TableGen] Use range-based for loop. NFC
1 parent 5803335 commit 2eabcb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/utils/TableGen/DAGISelMatcherGen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,8 @@ bool MatcherGen::EmitMatcherCode(unsigned Variant) {
580580
// checks (e.g. addrmode matches). We emit this after the structural match
581581
// because they are generally more expensive to evaluate and more difficult to
582582
// factor.
583-
for (unsigned i = 0, e = MatchedComplexPatterns.size(); i != e; ++i) {
584-
auto &N = *MatchedComplexPatterns[i].first;
583+
for (const auto &MCP : MatchedComplexPatterns) {
584+
auto &N = *MCP.first;
585585

586586
// Remember where the results of this match get stuck.
587587
if (N.isLeaf()) {
@@ -595,7 +595,7 @@ bool MatcherGen::EmitMatcherCode(unsigned Variant) {
595595
}
596596

597597
// Get the slot we recorded the value in from the name on the node.
598-
unsigned RecNodeEntry = MatchedComplexPatterns[i].second;
598+
unsigned RecNodeEntry = MCP.second;
599599

600600
const ComplexPattern *CP = N.getComplexPatternInfo(CGP);
601601
assert(CP && "Not a valid ComplexPattern!");

0 commit comments

Comments
 (0)