Use the TableGen directive back-end to generate code for the clauses unparsing.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Do you plan to update the tests?
flang/include/flang/Parser/parse-tree.h | ||
---|---|---|
3471 | Would it make sense to move dist_schedule out of OmpClause and have it as a separate struct? |
Yeah I forgot that. Will update the patch today with updated test.
flang/include/flang/Parser/parse-tree.h | ||
---|---|---|
3471 | Yeah I thought about doing that. Might make it clearer that it's a specific case and doesn't fit in the generic ones. |
LGTM. I have mentioned a few nits. You also have some clang-tidy warnings to fix.
BTW, the tests do not seem to be using the new fields introduced in this patch. Would it make sense to use them in the test?
bit valueIsList = 0; string defaultValue = "";
llvm/utils/TableGen/DirectiveEmitter.cpp | ||
---|---|---|
183 | Nit: Should the name be isValueList to remain consistent with other boolean functions? | |
550–559 | Nit: Was just checking whether this code can be improved. | |
604 | Nit: as -> is |
@kiranchandramohan Thanks for the review. I have added test and corrected other stuffs. One clang-today warning will remain for the function name. It is not consistent with the rest of TableGen so I ignored it from the beginning.
Would it make sense to move dist_schedule out of OmpClause and have it as a separate struct?