Add wrapper classes to to access record's fields. This makes it easier to
pass record information to the diverse functions for code generation.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Are you following an existing TableGen emitter as a precedent for this kind of thin wrapper design?
llvm/include/llvm/Frontend/OpenACC/ACC.td | ||
---|---|---|
604 | This change doesn't appear to be relevant to this patch and can be committed without review anyway. | |
llvm/utils/TableGen/DirectiveEmitter.cpp | ||
53 | function -> functions place -> placed | |
58 | To the enums or the enumerators within them? I'm comparing to your comments in DirectiveBase.td. | |
64 | Likewise | |
69 | This documentation effectively defers to documentation in DirectiveBase.td. Other getter documentation here duplicates parts of the field documentation in DirectiveBase.td instead. I'm not sure which is better, but the documentation should be consistent. Duplication is obviously bad for maintenance, but does it improve readability here? An alternative would be to just write one comment that encloses all getters and that defers to DirectiveBase.td. | |
130 | onced -> once | |
156 | clanmg -> clang Is the fact that this is optional important to callers? Likewise for getFlangClass. | |
167 | This conflates isImplicit and isDefault. | |
171 | Should this comment be different than the one on Clause? | |
360 | I think the above would be easier to read if VerClause.getClause().getFormattedName() were stored in a local variable instead of repeated. |
I'm following the way it is done with MLIR table gen usage. You can find a bunch of them in mlir/include/mlir/TableGen.
Thanks for your comments. I'll update the patch today.
llvm/include/llvm/Frontend/OpenACC/ACC.td | ||
---|---|---|
604 | Right. Look like it was edited by me editor and made its way in the review ... I'll remove it from this patch. | |
llvm/utils/TableGen/DirectiveEmitter.cpp | ||
69 | Agreed. I'll update that. | |
156 | Yeah as it might be null. Will update the comment. |
This change doesn't appear to be relevant to this patch and can be committed without review anyway.