| commit | 1f5d2e62c62058e4bd2dbffab0ad5c218b70d7cb | [log] [tgz] |
|---|---|---|
| author | Andi Drebes <47449897+andidr@users.noreply.github.com> | Wed Nov 05 10:05:06 2025 +0100 |
| committer | Copybara-Service <copybara-worker@google.com> | Wed Nov 05 01:11:29 2025 -0800 |
| tree | 24a9e26dea37b800a34117b6bab84244303a9222 | |
| parent | 3d6fe5d1e3c0e31b3e4ead83775e3101cb2f0a90 [diff] |
[MLIR][ODS] Re-enable direct implementation of type interfaces with method bodies (#166335) Since commit 842622bf8bea782e9d9865ed78b0d8643f098122 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. GitOrigin-RevId: 8eacea993408c27287f985f27376501442b4dfc6
See https://mlir.llvm.org/ for more information.