llvm-project/llvm/docs/TableGen
Simon Tatham 1fed9a0c0c [TableGen] Add bang-operators !getop and !setop.
Summary:
These allow you to get and set the operator of a dag node, without
affecting its list of arguments.

`!getop` is slightly fiddly because in many contexts you need its
return value to have a static type more specific than 'any record'. It
works to say `!cast<BaseClass>(!getop(...))`, but it's cumbersome, so
I made `!getop` take an optional type suffix itself, so that can be
written as the shorter `!getop<BaseClass>(...)`.

Reviewers: hfinkel, nhaehnle

Reviewed By: nhaehnle

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71191
2019-12-11 12:05:22 +00:00
..
BackEnds.rst [TableGen] Add a general-purpose JSON backend. 2018-07-11 08:40:19 +00:00
Deficiencies.rst
LangIntro.rst [TableGen] Add bang-operators !getop and !setop. 2019-12-11 12:05:22 +00:00
LangRef.rst [TableGen] Add bang-operators !getop and !setop. 2019-12-11 12:05:22 +00:00
index.rst [TableGen] Add a general-purpose JSON backend. 2018-07-11 08:40:19 +00:00