[mlir] Allow for using interface class name in ODS interface definitions
It may be necessary for interface methods to process or return variables with the interface class type, in particular for attribute and type interfaces that can return modified attributes and types that implement the same interface. However, the code generated by ODS in this case would not compile because the signature (and the body if provided) appear in the definition of the Model class and before the interface class, which derives from the Model. Change the ODS interface method generator to emit only method declarations in the Model class itself, and emit method definitions after the interface class. Mark as "inline" since their definitions are still emitted in the header and are no longer implicitly inline. Add a forward declaration of the interface class before the Concept+Model classes to make the class name usable in declarations. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D91499
Loading
Please register or sign in to comment