[mlir] Use const reference for loop iteration variable.
authorAdrian Kuegel <akuegel@google.com>
Fri, 7 Jan 2022 11:00:53 +0000 (12:00 +0100)
committerAdrian Kuegel <akuegel@google.com>
Fri, 7 Jan 2022 11:00:53 +0000 (12:00 +0100)
mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp

index 9fd5de1..424c91f 100644 (file)
@@ -657,7 +657,7 @@ static Value buildPredicateList(pdl::PatternOp pattern,
   // Traverse the selected optimal branching. For all edges in order, traverse
   // up starting from the connector, until the candidate root is reached, and
   // call getTreePredicates at every node along the way.
-  for (auto it : llvm::enumerate(bestEdges)) {
+  for (const auto &it : llvm::enumerate(bestEdges)) {
     Value target = it.value().first;
     Value source = it.value().second;