[PATCH] D69701: [Utils] Allow "on-the-fly" argument changes for update_test_check scripts
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 1 02:13:10 PDT 2019
arichardson added a comment.
This seems useful, thanks! Another case that would be nice is if there was a way to keep comments inside the autogenerated CHECK lines.
For example:
; CHECK-NEXT: ...
;; We generate a foo instruction and not a bar instruction here because...
; CHECK-NEXT: foo a, b, c
; CHECK-NEXT: ...
Right now if you re-run the update script the comment will be moved after all the CHECK lines. I wonder if there is a way to keep inline comments (maybe only if the CHECK: lines before and after didn't change?). Would this work with the `UTC_ARGS: --turn off` method?
================
Comment at: llvm/utils/UpdateTestChecks/common.py:53
+UTC_ARGS_KEY = 'UTC_ARGS:'
+UTC_ARGS_CMD = re.compile(r'.*' + UTC_ARGS_KEY + '\s*(?P<cmd>.*)\s*$')
----------------
I think you need a `r` for the second string as well since otherwise newer python will complain that `\s` is not a valid escape sequence.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69701/new/
https://reviews.llvm.org/D69701
More information about the llvm-commits
mailing list