[PATCH] D64589: [UpdateLLCTestChecks] Emit warning when invalid value for -check-prefix option
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 14:35:27 PDT 2019
xbolva00 updated this revision to Diff 209342.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64589/new/
https://reviews.llvm.org/D64589
Files:
update_llc_test_checks.py
Index: update_llc_test_checks.py
===================================================================
--- update_llc_test_checks.py
+++ update_llc_test_checks.py
@@ -102,6 +102,15 @@
check_prefixes = [item for m in common.CHECK_PREFIX_RE.finditer(filecheck_cmd)
for item in m.group(1).split(',')]
+
+ fc_cmd_parts = filecheck_cmd.split()
+ for part in fc_cmd_parts:
+ if "check-prefix=" in part:
+ wrong_prefix = part.split('=')[1]
+ if ',' in wrong_prefix:
+ print('WARNING: Prefix \'%s\' is invalid. Did you mean \'--check-prefixes=%s\'?' %
+ (wrong_prefix, wrong_prefix), file=sys.stderr)
+
if not check_prefixes:
check_prefixes = ['CHECK']
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64589.209342.patch
Type: text/x-patch
Size: 775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190711/ab3c7901/attachment.bin>
More information about the llvm-commits
mailing list