From 9a18ff3d629f3cd13d1a241700014c05757ca61f Mon Sep 17 00:00:00 2001 From: Alexander Belyaev Date: Wed, 23 Oct 2019 22:18:58 -0700 Subject: [PATCH] Wrap ODS to 80 lines and remove const qualifier for local `int` variable (NFC) This addresses post-submit comments on 00d2a37e32 PiperOrigin-RevId: 276419770 --- mlir/include/mlir/Dialect/StandardOps/Ops.td | 3 ++- mlir/lib/Dialect/StandardOps/Ops.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mlir/include/mlir/Dialect/StandardOps/Ops.td b/mlir/include/mlir/Dialect/StandardOps/Ops.td index ccacd1c16d1c..d675812cb476 100644 --- a/mlir/include/mlir/Dialect/StandardOps/Ops.td +++ b/mlir/include/mlir/Dialect/StandardOps/Ops.td @@ -82,7 +82,8 @@ class UnaryOp traits = []> : }]; } -class UnaryOpSameOperandAndResultType traits = []> : +class UnaryOpSameOperandAndResultType traits = []> : UnaryOp { let parser = [{ return impl::parseOneResultSameOperandTypeOp(parser, result); diff --git a/mlir/lib/Dialect/StandardOps/Ops.cpp b/mlir/lib/Dialect/StandardOps/Ops.cpp index 739def41f8ee..3b52aafcb022 100644 --- a/mlir/lib/Dialect/StandardOps/Ops.cpp +++ b/mlir/lib/Dialect/StandardOps/Ops.cpp @@ -130,7 +130,7 @@ static void printStandardUnaryOp(Operation *op, OpAsmPrinter &p) { assert(op->getNumOperands() == 1 && "unary op should have one operand"); assert(op->getNumResults() == 1 && "unary op should have one result"); - const int stdDotLen = StandardOpsDialect::getDialectNamespace().size() + 1; + int stdDotLen = StandardOpsDialect::getDialectNamespace().size() + 1; p << op->getName().getStringRef().drop_front(stdDotLen) << ' ' << *op->getOperand(0); p.printOptionalAttrDict(op->getAttrs()); @@ -152,7 +152,7 @@ static void printStandardBinaryOp(Operation *op, OpAsmPrinter &p) { return; } - const int stdDotLen = StandardOpsDialect::getDialectNamespace().size() + 1; + int stdDotLen = StandardOpsDialect::getDialectNamespace().size() + 1; p << op->getName().getStringRef().drop_front(stdDotLen) << ' ' << *op->getOperand(0) << ", " << *op->getOperand(1); p.printOptionalAttrDict(op->getAttrs()); @@ -164,7 +164,7 @@ static void printStandardBinaryOp(Operation *op, OpAsmPrinter &p) { /// A custom cast operation printer that omits the "std." prefix from the /// operation names. static void printStandardCastOp(Operation *op, OpAsmPrinter &p) { - const int stdDotLen = StandardOpsDialect::getDialectNamespace().size() + 1; + int stdDotLen = StandardOpsDialect::getDialectNamespace().size() + 1; p << op->getName().getStringRef().drop_front(stdDotLen) << ' ' << *op->getOperand(0) << " : " << op->getOperand(0)->getType() << " to " << op->getResult(0)->getType();