Skip to content

Commit 9a32d4d

Browse files
author
git apple-llvm automerger
committed
Merge commit '29d990e43959' from llvm.org/main into next
2 parents cb418b7 + 29d990e commit 9a32d4d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mlir/docs/Tutorials/DefiningAttributesAndTypes.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,14 +422,14 @@ in the IR:
422422
### Parameter Parsing and Printing
423423

424424
For many basic parameter types, no additional work is needed to define how
425-
these parameters are parsed or printerd.
425+
these parameters are parsed or printed.
426426

427427
* The default printer for any parameter is `$_printer << $_self`,
428-
where `$_self` is the C++ value of the parameter and `$_printer` is a
429-
`DialectAsmPrinter`.
428+
where `$_self` is the C++ value of the parameter and `$_printer` is an
429+
`AsmPrinter`.
430430
* The default parser for a parameter is
431431
`FieldParser<$cppClass>::parse($_parser)`, where `$cppClass` is the C++ type
432-
of the parameter and `$_parser` is a `DialectAsmParser`.
432+
of the parameter and `$_parser` is an `AsmParser`.
433433

434434
Printing and parsing behaviour can be added to additional C++ types by
435435
overloading these functions or by defining a `parser` and `printer` in an ODS
@@ -440,12 +440,12 @@ Example of overloading:
440440
```c++
441441
using MyParameter = std::pair<int, int>;
442442

443-
DialectAsmPrinter &operator<<(DialectAsmPrinter &printer, MyParameter param) {
443+
AsmPrinter &operator<<(AsmPrinter &printer, MyParameter param) {
444444
printer << param.first << " * " << param.second;
445445
}
446446

447447
template <> struct FieldParser<MyParameter> {
448-
static FailureOr<MyParameter> parse(DialectAsmParser &parser) {
448+
static FailureOr<MyParameter> parse(AsmParser &parser) {
449449
int a, b;
450450
if (parser.parseInteger(a) || parser.parseStar() ||
451451
parser.parseInteger(b))

0 commit comments

Comments
 (0)