[TableGen] Support named arguments
authorwangpc <wangpengcheng.pp@bytedance.com>
Thu, 20 Jul 2023 08:02:03 +0000 (16:02 +0800)
committerwangpc <wangpengcheng.pp@bytedance.com>
Thu, 20 Jul 2023 08:03:17 +0000 (16:03 +0800)
commit91ccbc6c1c4c121935ee4fbfa0db13ad86590a59
treeab7727a6ba48a38cf8e184341242525edffd0d45
parent82b4368f7f89e2b16b9eb09787b7a7af07e3b7cd
[TableGen] Support named arguments

We provide a way to specify arguments in the form of `name=value`
so that we don't have to specify all optional arguments before the
one we'd like to change. Required arguments can alse be specified
in this way.

Note that the argument can only be specified once regardless of
the way (named or positional) to specify and positional arguments
should be put before named arguments.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D152998
llvm/docs/ReleaseNotes.rst
llvm/docs/TableGen/ProgRef.rst
llvm/include/llvm/TableGen/Record.h
llvm/lib/TableGen/Record.cpp
llvm/lib/TableGen/TGParser.cpp
llvm/lib/TableGen/TGParser.h
llvm/test/TableGen/named-arguments.td [new file with mode: 0644]
llvm/test/TableGen/template-args.td