forked from OSchip/llvm-project
a4f81b2054
ODS currently emits the interface trait class as a nested class inside the interface class. As an unintended consequence, the default implementations of interface methods have implicit access to static fields of the interface class, e.g. those declared in `extraClassDeclaration`, including private methods (!), or in the parent class. This may break the use of default implementations for external models, which are not defined in the interface class, and generally complexifies the abstraction. Emit intraface traits outside of the interface class itself to avoid accidental implicit visibility. Public static fields can still be accessed via explicit qualification with a class name, e.g., `MyOpInterface::staticMethod()` instead of `staticMethod`. Update the documentation to clarify the role of `extraClassDeclaration` in interfaces. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D104384 |
||
---|---|---|
.. | ||
AttrOrTypeDefGen.cpp | ||
CMakeLists.txt | ||
DialectGen.cpp | ||
DirectiveCommonGen.cpp | ||
DocGenUtilities.h | ||
EnumsGen.cpp | ||
LLVMIRConversionGen.cpp | ||
LLVMIRIntrinsicGen.cpp | ||
OpDefinitionsGen.cpp | ||
OpDocGen.cpp | ||
OpFormatGen.cpp | ||
OpFormatGen.h | ||
OpGenHelpers.cpp | ||
OpGenHelpers.h | ||
OpInterfacesGen.cpp | ||
OpPythonBindingGen.cpp | ||
PassCAPIGen.cpp | ||
PassDocGen.cpp | ||
PassGen.cpp | ||
RewriterGen.cpp | ||
SPIRVUtilsGen.cpp | ||
StructsGen.cpp | ||
mlir-tblgen.cpp |