[all-commits] [llvm/llvm-project] be5926: [mlir] Make `extraClassOf` compile with attribute ...
Markus Böck via All-commits
all-commits at lists.llvm.org
Wed Sep 13 14:38:52 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: be59265bbde77bba40599f114a6bedfe91da5c07
https://github.com/llvm/llvm-project/commit/be59265bbde77bba40599f114a6bedfe91da5c07
Author: Markus Böck <markus.boeck02 at gmail.com>
Date: 2023-09-13 (Wed, 13 Sep 2023)
Changed paths:
M mlir/include/mlir/IR/Attributes.h
M mlir/include/mlir/IR/Types.h
M mlir/test/lib/Dialect/Test/TestInterfaces.td
Log Message:
-----------
[mlir] Make `extraClassOf` compile with attribute and type interfaces (#66292)
Using `extraClassOf` currently does not work with attribute or type
interfaces as the generated code calls `getInterfaceFor`, a private
method of `AttributeInterface` and `TypeInterface` respectively.
This PR fixes this by applying the same change that has been done to
`OpInterface` in the past: Make `getInterfaceFor` a protected member of
the class, allowing the generated code in subclasses to use it.
An attribute and type interface with `extraClassOf` have been added as
interfaces in the test dialect to ensure it compiles without errors.
More information about the All-commits
mailing list