summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/TGLexer.h
diff options
context:
space:
mode:
authorSimon Tatham <simon.tatham@arm.com>2019-12-11 12:02:15 +0000
committerSimon Tatham <simon.tatham@arm.com>2019-12-11 12:05:22 +0000
commit1fed9a0c0c3e74c21dfbd1edf18411a33b742f52 (patch)
tree48690ac8255c77890878bbecb0cd72c83f88be0a /llvm/lib/TableGen/TGLexer.h
parentafb13afcf2232c81fe8097832e5b6a2bde6bb3a5 (diff)
downloadbcm5719-llvm-1fed9a0c0c3e74c21dfbd1edf18411a33b742f52.tar.gz
bcm5719-llvm-1fed9a0c0c3e74c21dfbd1edf18411a33b742f52.zip
[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
Diffstat (limited to 'llvm/lib/TableGen/TGLexer.h')
-rw-r--r--llvm/lib/TableGen/TGLexer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/TableGen/TGLexer.h b/llvm/lib/TableGen/TGLexer.h
index 11a9bd303f5..b5cf4bd7374 100644
--- a/llvm/lib/TableGen/TGLexer.h
+++ b/llvm/lib/TableGen/TGLexer.h
@@ -51,7 +51,7 @@ namespace tgtok {
// !keywords.
XConcat, XADD, XMUL, XAND, XOR, XSRA, XSRL, XSHL, XListConcat, XListSplat,
XStrConcat, XCast, XSubst, XForEach, XFoldl, XHead, XTail, XSize, XEmpty,
- XIf, XCond, XEq, XIsA, XDag, XNe, XLe, XLt, XGe, XGt,
+ XIf, XCond, XEq, XIsA, XDag, XNe, XLe, XLt, XGe, XGt, XSetOp, XGetOp,
// Integer value.
IntVal,
OpenPOWER on IntegriCloud