[PATCH] D152373: [TableGen] Support warnings on unused classes and multiclasses.

Ivan Kosarev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 04:11:11 PDT 2023


kosarev added a comment.

> The implementation looks good to me, except perhaps for `isInCommonTableGenHeader`. It seems like you're inventing a new concept of C-like "system headers", which TableGen did not previously have.

That was the intention, yes. I think conceptually the common .td files are part of the TableGen backends as much as system headers are part of a C implementation.

However, I guess the purity of the core TableGen code might still be of concern with the `isInCommonTableGenHeader()` hardcoding the paths, in which case something more explicit would probably work better, like instantiating a special class in such headers maybe?

  // In include/llvm/CodeGen/ValueTypes.td.
  // The file path in the source position of the definition should now
  // be considered a path of a common TableGen header.
  def : CommonTableGenHeader<"ValueTypes">;


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152373/new/

https://reviews.llvm.org/D152373



More information about the llvm-commits mailing list