[PATCH] D156420: [TableGen] Add `!dump` and `dump`.
Wang Pengcheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 27 21:01:49 PDT 2023
wangpc added a comment.
Thanks! The implementation is just what I have imagined before!
One suggestion: can we accept variable-length arguments (at least one) and the first needn't to be a string? The output is just concatenation of all arguments and we make current implementation a special case. So that we can dump multiple values in a single line.
================
Comment at: llvm/docs/TableGen/ProgRef.rst:1247
+A ``dump`` statement prints the content of a variable or a record to
+standard output.
+
----------------
standard error output?
================
Comment at: llvm/lib/TableGen/TGParser.cpp:3931
+ // Turn this print str, expr into an assert:
+ // assert 1, !cast<string>(!print(str, expr))
+ SMLoc ConditionLoc = Lex.getLoc();
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156420/new/
https://reviews.llvm.org/D156420
More information about the llvm-commits
mailing list