[PATCH] D53798: [lit] Add --show-substitutions
Eugene Sharygin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 1 06:42:52 PDT 2018
eush added inline comments.
================
Comment at: utils/lit/lit/main.py:352
+ if opts.showSubstitutions:
+ opts.showSuites = True
+
----------------
delcypher wrote:
> Why is showing substitutions coupled with listing the test suites?
Substitutions are defined per test suite, so we have to list test suites anyway. We could hide some lines though
(such as available features).
================
Comment at: utils/lit/lit/main.py:433
+ for (pattern, replacement) in ts.config.substitutions:
+ if re.match(r'[\'"]|.*\s', pattern):
+ pattern = repr(pattern)
----------------
delcypher wrote:
> Is all this regex really necessary? Couldn't we just always print `repr(pattern), repr(replacement)`?
My only concern is that otherwise it would be harder to read regexes since they would be (doubly) escaped.
Repository:
rL LLVM
https://reviews.llvm.org/D53798
More information about the llvm-commits
mailing list