Change the contract with the type/attribute parsing to let the dispatch handle the...
authorMehdi Amini <joker.eph@gmail.com>
Wed, 10 Nov 2021 00:38:01 +0000 (00:38 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Wed, 10 Nov 2021 00:47:15 +0000 (00:47 +0000)
commitf30a8a6f6740c1348928090f7749b638bf0f646a
tree214b34d3d4b8108e0f33b2251149b298c72dccdf
parentc27d85a9c91080c0d501f5e070026f06cfacceaa
Change the contract with the type/attribute parsing to let the dispatch handle the mnemonic

This breaking change requires to remove printing the mnemonic in the print()
method on Type/Attribute classes.
This makes it consistent with the parsing code which alread handles the
mnemonic outside of the parsing method.

This likely won't break the build for anyone, but tests will start
failing for dialects downstream. The fix is trivial and look like
going from:

void emitc::OpaqueType::print(DialectAsmPrinter &printer) const {
  printer << "opaque<\"";

to:

void emitc::OpaqueAttr::print(DialectAsmPrinter &printer) const {
  printer << "<\"";

Reviewed By: rriddle, aartbik

Differential Revision: https://reviews.llvm.org/D113334
mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td
mlir/lib/Dialect/Async/IR/Async.cpp
mlir/lib/Dialect/EmitC/IR/EmitC.cpp
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
mlir/lib/Dialect/PDL/IR/PDLTypes.cpp
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
mlir/test/lib/Dialect/Test/TestAttributes.cpp
mlir/test/lib/Dialect/Test/TestTypeDefs.td
mlir/test/lib/Dialect/Test/TestTypes.cpp
mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp