diff --git a/llvm/docs/TableGen/ProgRef.rst b/llvm/docs/TableGen/ProgRef.rst --- a/llvm/docs/TableGen/ProgRef.rst +++ b/llvm/docs/TableGen/ProgRef.rst @@ -219,14 +219,15 @@ .. productionlist:: BangOperator: one of - : !add !and !cast !con !dag - : !div !empty !eq !filter !find - : !foldl !foreach !ge !getdagop !gt - : !head !if !interleave !isa !le - : !listconcat !listremove !listsplat !logtwo !lt - : !mul !ne !not !or !setdagop - : !shl !size !sra !srl !strconcat - : !sub !subst !substr !tail !xor + : !add !and !cast !con !dag + : !div !empty !eq !exists !filter + : !find !foldl !foreach !ge !getdagop + : !gt !head !if !interleave !isa + : !le !listconcat !listremove !listsplat !logtwo + : !lt !mul !ne !not !or + : !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: @@ -1630,17 +1631,15 @@ This operator produces 1 if the string, list, or DAG *a* is empty; 0 otherwise. A dag is empty if it has no arguments; the operator does not count. -``!tolower(``\ *a*\ ``)`` - This operator converts a string input *a* to lower case. - -``!toupper(``\ *a*\ ``)`` - This operator converts a string input *a* to upper case. - ``!eq(`` *a*\ `,` *b*\ ``)`` This operator produces 1 if *a* is equal to *b*; 0 otherwise. The arguments must be ``bit``, ``bits``, ``int``, ``string``, or record values. Use ``!cast`` to compare other types of objects. +``!exists<``\ *type*\ ``>(``\ *name*\ ``)`` + This operator produces 1 if a record of the given *type* whose name is *name* + exists; 0 otherwise. *name* should be of type *string*. + ``!filter(``\ *var*\ ``,`` *list*\ ``,`` *predicate*\ ``)`` This operator creates a new ``list`` by filtering the elements in @@ -1734,10 +1733,6 @@ This operator produces 1 if the type of *a* is a subtype of the given *type*; 0 otherwise. -``!exists<``\ *type*\ ``>(``\ *name*\ ``)`` - This operator produces 1 if a record of the given *type* whose name is *name* - exists; 0 otherwise. *name* should be of type *string*. - ``!le(``\ *a*\ ``,`` *b*\ ``)`` This operator produces 1 if *a* is less than or equal to *b*; 0 otherwise. The arguments must be ``bit``, ``bits``, ``int``, or ``string`` values. @@ -1834,6 +1829,12 @@ This operator produces a new list with all the elements of the list *a* except for the zeroth one. (See also ``!head``.) +``!tolower(``\ *a*\ ``)`` + This operator converts a string input *a* to lower case. + +``!toupper(``\ *a*\ ``)`` + This operator converts a string input *a* to upper case. + ``!xor(``\ *a*\ ``,`` *b*\ ``, ...)`` This operator does a bitwise EXCLUSIVE OR on *a*, *b*, etc., and produces the result. A logical XOR can be performed if all the arguments are either