[PATCH] D152998: [TableGen][RISCV] Support named arguments
Michael Maitland via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 15:20:18 PDT 2023
michaelmaitland added a comment.
Thanks for this patch. It will make maintenance much easier!
================
Comment at: llvm/lib/TableGen/TGParser.cpp:3123
//
// TemplateArgList ::= '<' [Value {',' Value}*] '>'
bool TGParser::ParseTemplateArgValueList(SmallVectorImpl<Init *> &Result,
----------------
Does `TemplateArgList` production need to be updated to something along the lines of:
```
TemplateArgList ::= '<' [[NamedArg=]Value {',' [NamedArg=]Value}*] '>'
```
================
Comment at: llvm/lib/TableGen/TGParser.cpp:3161
+ ItemType = NamedArg->getType();
+ ArgName = QualifiedName;
+ Value = ParseValue(CurRec, ItemType);
----------------
nit: modifies element being iterated over, sets it to something in scope, but uses ArgName after we leave scope.
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