
This commit takes the `summary` and `description` of TableGen files and generate a cpp comments on top of the declarations of generated cpp classes. The main motivation is to improve the developer experience. When people work on compilers from an IDE, they will be able to hover over the symbols (e.g. `"ADialect::BOp"`) in their cpp code and see the summary and descriptions without having to referring to the `.td` files.
44 lines
793 B
CMake
44 lines
793 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
CodeGenTypes
|
|
Demangle
|
|
Support
|
|
TableGen
|
|
)
|
|
|
|
add_tablegen(mlir-tblgen MLIR
|
|
DESTINATION "${MLIR_TOOLS_INSTALL_DIR}"
|
|
EXPORT MLIR
|
|
AttrOrTypeDefGen.cpp
|
|
AttrOrTypeFormatGen.cpp
|
|
BytecodeDialectGen.cpp
|
|
DialectGen.cpp
|
|
DirectiveCommonGen.cpp
|
|
EnumsGen.cpp
|
|
EnumPythonBindingGen.cpp
|
|
FormatGen.cpp
|
|
LLVMIRConversionGen.cpp
|
|
LLVMIRIntrinsicGen.cpp
|
|
mlir-tblgen.cpp
|
|
OmpOpGen.cpp
|
|
OpClass.cpp
|
|
OpDefinitionsGen.cpp
|
|
OpDocGen.cpp
|
|
OpFormatGen.cpp
|
|
OpGenHelpers.cpp
|
|
OpInterfacesGen.cpp
|
|
OpPythonBindingGen.cpp
|
|
PassCAPIGen.cpp
|
|
PassDocGen.cpp
|
|
PassGen.cpp
|
|
RewriterGen.cpp
|
|
SPIRVUtilsGen.cpp
|
|
TosaUtilsGen.cpp
|
|
CppGenUtilities.cpp
|
|
)
|
|
|
|
target_link_libraries(mlir-tblgen
|
|
PRIVATE
|
|
MLIRTblgenLib)
|
|
|
|
mlir_check_all_link_libraries(mlir-tblgen)
|