Commit ff5696ce authored by max's avatar max
Browse files

Document CMake Changes Needed to Generate Attribute Code from TableGen

I've been struggling with generating the C++ class declarations and definitions for custom attributes from TableGen, as described on this documentation page: https://mlir.llvm.org/docs/DefiningDialects/AttributesAndTypes/#adding-a-new-attribute-or-type-definition

The code for custom types is automatically generated when the MLIR Dialect is added with `add_mlir_dialect()` in the CMake file.

The same is not the case for custom attributes. I think people could benefit from learning how to adjsut their CMakeLists.txt to automatically generate the classes as described on that documentation page. This change adds the necessary information for this.

makslevental on Discord was so kind to help me figure this out myself

Reviewed By: makslevental

Differential Revision: https://reviews.llvm.org/D155249
parent 9478f661
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment