[PATCH] D152998: [TableGen] Support named arguments
Wang Pengcheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 05:03:25 PDT 2023
wangpc marked 6 inline comments as done.
wangpc added inline comments.
================
Comment at: llvm/include/llvm/TableGen/Record.h:513
+ }
+ Init *getCastTo(RecTy *Ty) const override { return nullptr; }
+ Init *convertInitializerTo(RecTy *Ty) const override { return nullptr; }
----------------
michaelmaitland wrote:
> Do we really want to return `nullptr` for `getCastTo` and `convertInitializerTo`? Maybe it would be better to `llvm_unreachable("TODO: Implement")`.
I decided to delegate all these method to `Value`.
================
Comment at: llvm/lib/TableGen/TGParser.cpp:647
+ if (!Default->isComplete()) {
+ return Error(Loc, "value not specified for template argument (" +
+ UnsolvedArgName->getAsUnquotedString() +
----------------
michaelmaitland wrote:
> Add test for this error path?
These should have already been catched by `llvm/test/TableGen/template-args.td`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152998/new/
https://reviews.llvm.org/D152998
More information about the llvm-commits
mailing list