[llvm] [TableGen] New bang operator `!repr`. (PR #68716)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 10:46:16 PDT 2023


================
@@ -1850,6 +1850,10 @@ and non-0 as true.
 ``!range(``\ *list*\ ``)``
     Equivalent to ``!range(0, !size(list))``.
 
+``!repr(``\ *value*` ``)``
+    Represents *value* as a string. In particular, it allows to print
+    the content of records for debugging purposes.
----------------
Artem-B wrote:

AFAICT, we can't do debugging printouts from tablegen yet.
Perhaps rephrase it in a more general terms. E.g. "String format for the value is not guaranteed to be stable. Intended for debugging purposes only."

https://github.com/llvm/llvm-project/pull/68716


More information about the llvm-commits mailing list