[llvm] [TableGen][Docs] Improve productionlist for BangOperator (PR #123731)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 03:00:57 PST 2025
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/123731
Quote literal strings and use the standard `|` operator instead of the
text "one of".
>From 5474e179b66982e970943dd0b1dfa7e2d009c95e Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at amd.com>
Date: Tue, 21 Jan 2025 10:54:51 +0000
Subject: [PATCH] [TableGen][Docs] Improve productionlist for BangOperator
Quote literal strings and use the standard `|` operator instead of the
text "one of".
---
llvm/docs/TableGen/ProgRef.rst | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/llvm/docs/TableGen/ProgRef.rst b/llvm/docs/TableGen/ProgRef.rst
index cfe61382658ec4..e4aad655d145ae 100644
--- a/llvm/docs/TableGen/ProgRef.rst
+++ b/llvm/docs/TableGen/ProgRef.rst
@@ -218,24 +218,23 @@ Bang operators
TableGen provides "bang operators" that have a wide variety of uses:
.. productionlist::
- BangOperator: one of
- : !add !and !cast !con !dag
- : !div !empty !eq !exists !filter
- : !find !foldl !foreach !ge !getdagarg
- : !getdagname !getdagop !gt !head !if
- : !initialized !interleave !isa !le !listconcat
- : !listflatten !listremove !listsplat !logtwo !lt
- : !mul !ne !not !or !range
- : !repr !setdagarg !setdagname !setdagop !shl
- : !size !sra !srl !strconcat !sub
- : !subst !substr !tail !tolower !toupper
- : !xor
+ BangOperator: "!add" | "!and" | "!cast" | "!con" | "!dag"
+ :| "!div" | "!empty" | "!eq" | "!exists" | "!filter"
+ :| "!find" | "!foldl" | "!foreach" | "!ge" | "!getdagarg"
+ :| "!getdagname" | "!getdagop" | "!gt" | "!head" | "!if"
+ :| "!initialized" | "!interleave" | "!isa" | "!le" | "!listconcat"
+ :| "!listflatten" | "!listremove" | "!listsplat" | "!logtwo" | "!lt"
+ :| "!mul" | "!ne" | "!not" | "!or" | "!range"
+ :| "!repr" | "!setdagarg" | "!setdagname" | "!setdagop" | "!shl"
+ :| "!size" | "!sra" | "!srl" | "!strconcat" | "!sub"
+ :| "!subst" | "!substr" | "!tail" | "!tolower" | "!toupper"
+ :| "!xor"
The ``!cond`` operator has a slightly different
syntax compared to other bang operators, so it is defined separately:
.. productionlist::
- CondOperator: !cond
+ CondOperator: "!cond"
See `Appendix A: Bang Operators`_ for a description of each bang operator.
More information about the llvm-commits
mailing list