[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 13:43:00 PDT 2019
xbolva00 created this revision.
xbolva00 added a reviewer: lebedev.ri.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
xbolva00 added a comment.
lebedev.ri hit this recently so I added him as reviewer.
The script is silent for the following issue:
FileCheck %s -check-prefix=CHECK,POPCOUNT
FileCheck will catch it later, but I think we can warn here too.
Now it warns:
./update_llc_test_checks.py file.ll
WARNING: Prefix name 'CHECK,POPCOUNT' is invalid. Did you mean '-check-prefixes=CHECK,POPCOUNT' ?
Repository:
rL LLVM
https://reviews.llvm.org/D64589
Files:
utils/update_llc_test_checks.py
Index: utils/update_llc_test_checks.py
===================================================================
--- utils/update_llc_test_checks.py
+++ utils/update_llc_test_checks.py
@@ -102,6 +102,12 @@
check_prefixes = [item for m in common.CHECK_PREFIX_RE.finditer(filecheck_cmd)
for item in m.group(1).split(',')]
+
+ if "-check-prefix=" in filecheck_cmd and len(check_prefixes) > 1:
+ wrong_prefix = ",".join(check_prefixes)
+ print('WARNING: Prefix name \'%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.209317.patch
Type: text/x-patch
Size: 713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190711/5bfeaa28/attachment.bin>
More information about the llvm-commits
mailing list