[llvm] [Tablegen] Add keywork `dump`. (PR #68793)
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 11 14:32:56 PDT 2023
================
@@ -1275,6 +1275,23 @@ be nested.
This loop defines records named ``R0``, ``R1``, ``R2``, and ``R3``, along
with ``F0``, ``F1``, ``F2``, and ``F3``.
+``dump`` --- print messages to stderr
+-------------------------------------
+
+A ``dump`` statement prints the input string to standard error
+output. It is intended for debugging purpose.
+
+.. productionlist::
+ Dump: "dump" `string` ";"
+
+For example, it can be used in combination with `!repl` to investigate
+the values passed to a multiclass:
+
+.. code-block:: text
+
+ multiclass MC<dag s> {
+ dump "s = " # !repl(s);
----------------
nhaehnle wrote:
Same here: `!repr`
https://github.com/llvm/llvm-project/pull/68793
More information about the llvm-commits
mailing list