[llvm] [TableGen] Add a field to filter out GenericTable entries (PR #65458)
Wang Pengcheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 6 09:20:47 PDT 2023
wangpc-pp wrote:
> The change looks OK to me, but this should surely have a test in `llvm/test/TableGen`.
Thanks! I was planning to add a test but I can't find existed tests for `GenericTable`. I will try to add one later.
>
> You don't say what the use case for this is. I'm guessing it might be so you can construct two `GenericTable`s with the same `FilterClass`, so that they select from the same overall set of records, but assign them different `FilterClassField` values so that they include different subsets of the records of that class?
Yes! This can be a scenario! And I posted another PR #65460 to show the usage.
>
> Perhaps demonstrating that in the new test would be a good idea, and maybe mentioning it in the documentation too. (Documentation is at least as much for "what feature can I use to do this thing?" as "what does this feature do?")\
Will do, thanks!
https://github.com/llvm/llvm-project/pull/65458
More information about the llvm-commits
mailing list