[mlir] Fix AsmPrinter for types with sub elements
authorVladislav Vinogradov <vlad.vinogradov@intel.com>
Mon, 11 Oct 2021 11:52:06 +0000 (14:52 +0300)
committerVladislav Vinogradov <vlad.vinogradov@intel.com>
Tue, 12 Oct 2021 09:08:16 +0000 (12:08 +0300)
commitc6390f19f20c93687d6366f6e78d6e96f1f0a126
tree97e561973e0dc0e5e4bf0da72439193b08ce2cb9
parent505afd1e648355b3301d167a0fdc3d3bb402b351
[mlir] Fix AsmPrinter for types with sub elements

Call `printType(subElemType)` instead of `os << subElemType` for them.
It allows to handle type aliases inside complex types.

As a side effect, fixed `test.int` parsing.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D111536
mlir/lib/IR/AsmPrinter.cpp
mlir/test/IR/print-attr-type-aliases.mlir
mlir/test/lib/Dialect/Test/TestDialect.cpp
mlir/test/lib/Dialect/Test/TestTypes.cpp
mlir/test/mlir-tblgen/testdialect-typedefs.mlir