[PATCH] D152998: [TableGen] Support named arguments

Wang Pengcheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 00:01:57 PDT 2023


wangpc marked an inline comment as done.
wangpc added inline comments.


================
Comment at: llvm/lib/TableGen/TGParser.cpp:598
+                            UnsolvedArgName->getAsUnquotedString() +
+                            ") of multiclass '" + Rec->getNameInitAsString() +
+                            "'");
----------------
wangpc wrote:
> DavidSpickett wrote:
> > I noticed this working on my Tablegen notebooks, the following example gives the error, but is not itself a multiclass at least not from the user's point of view:
> > ```
> > class C <int a, int b> {
> >     int c = a;
> >     int d = b;
> > }
> > def X: C<0> {}
> > ```
> > ```
> > $ ./bin/llvm-tblgen /tmp/test.td
> > /tmp/test.td:5:8: error: value not specified for template argument (C:b) of multiclass 'C'
> > def X: C<0> {}
> >        ^
> > ```
> > Do you have enough information in this context to be able to make the error message more accurate?
> Oops, it is my mistake. I will fix it and print accurate location of unspecified argument.
Should be fixed in D156966.


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