[mlir] NFC - Fix unused variable in non-debug mode
authorNicolas Vasilache <nicolas.vasilache@gmail.com>
Wed, 20 Jan 2021 22:19:59 +0000 (22:19 +0000)
committerNicolas Vasilache <nicolas.vasilache@gmail.com>
Wed, 20 Jan 2021 22:20:38 +0000 (22:20 +0000)
mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td

index b8009a8..7f3839a 100644 (file)
@@ -1083,9 +1083,11 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
       Operation::operand_range res{
         getOperation()->getOperands().begin() + getNumShapedOperands(),
         getOperation()->getOperands().end()};
       Operation::operand_range res{
         getOperation()->getOperands().begin() + getNumShapedOperands(),
         getOperation()->getOperands().end()};
-      for (Type t : TypeRange{res})
+      for (Type t : TypeRange{res}) {
+        (void)t;
         assert((t.isSignlessIntOrIndexOrFloat() || t.template isa<VectorType>())
                &&"expected scalar or vector type");
         assert((t.isSignlessIntOrIndexOrFloat() || t.template isa<VectorType>())
                &&"expected scalar or vector type");
+      }
       return res;
     }
 
       return res;
     }