[mlir] Apply ClangTidy performance finding (NFC)
authorAdrian Kuegel <akuegel@google.com>
Tue, 23 May 2023 06:52:53 +0000 (08:52 +0200)
committerAdrian Kuegel <akuegel@google.com>
Tue, 23 May 2023 06:52:53 +0000 (08:52 +0200)
mlir/lib/CAPI/Interfaces/Interfaces.cpp

index e597a7b..3144a33 100644 (file)
@@ -152,7 +152,7 @@ MlirLogicalResult mlirInferShapedTypeOpInterfaceInferReturnTypes(
   bool hasRank;
   intptr_t rank;
   const int64_t *shapeData;
-  for (ShapedTypeComponents t : inferredTypeComponents) {
+  for (const ShapedTypeComponents &t : inferredTypeComponents) {
     if (t.hasRank()) {
       hasRank = true;
       rank = t.getDims().size();