Wrap ODS to 80 lines and remove const qualifier for local `int` variable (NFC)

This addresses post-submit comments on 00d2a37e32

PiperOrigin-RevId: 276419770
This commit is contained in:
Alexander Belyaev 2019-10-23 22:18:58 -07:00 committed by A. Unique TensorFlower
parent 21ee4e987f
commit 9a18ff3d62
2 changed files with 5 additions and 4 deletions

View File

@ -82,7 +82,8 @@ class UnaryOp<string mnemonic, list<OpTrait> traits = []> :
}];
}
class UnaryOpSameOperandAndResultType<string mnemonic, list<OpTrait> traits = []> :
class UnaryOpSameOperandAndResultType<string mnemonic,
list<OpTrait> traits = []> :
UnaryOp<mnemonic, !listconcat(traits, [SameOperandsAndResultType])> {
let parser = [{
return impl::parseOneResultSameOperandTypeOp(parser, result);

View File

@ -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();