Commit 8eacea9
authored
[MLIR][ODS] Re-enable direct implementation of type interfaces with method bodies (#166335)
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 628d53a commit 8eacea9
File tree
2 files changed
+11
-2
lines changed- mlir
- test/lib/Dialect/Test
- tools/mlir-tblgen
2 files changed
+11
-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 | + | |
642 | 644 | | |
643 | 645 | | |
644 | 646 | | |
| |||
0 commit comments