Commit ca5e4c9
committed
[MLIR][ODS] Re-enable direct implementation of type interfaces with method bodies
Since commit 842622b adding support
for overloading interface methods, a `using` directive is emitted for
any interface method that does not require emission of a trait method,
including for methods that define a method body.
However, methods directly specifying a body (e.g., via the
`methodBody` parameter of `InterfaceMethod`) are implemented directly
in the interface class and are therefore not present in the associated
trait. The generated `using` directive then referes to a non-existent
method of the trait, resulting in an error upon compilation of the
generated code.
This patch changes `DefGen::emitTraitMethods()`, such that
`genTraitMethodUsingDecl()` is not invoked for interface methods with
a body anymore.1 parent 93e860e commit ca5e4c9
File tree
2 files changed
+12
-2
lines changed- mlir
- test/lib/Dialect/Test
- tools/mlir-tblgen
2 files changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
473 | 480 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | | - | |
641 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
642 | 645 | | |
643 | 646 | | |
644 | 647 | | |
| |||
0 commit comments