[PATCH] D92542: [tools] Update update_test_prefix.py to handle %s after prefixes
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 3 20:06:19 PST 2020
mtrofin updated this revision to Diff 309448.
mtrofin added a comment.
updated with last regexp
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92542/new/
https://reviews.llvm.org/D92542
Files:
llvm/utils/update_test_prefix.py
Index: llvm/utils/update_test_prefix.py
===================================================================
--- llvm/utils/update_test_prefix.py
+++ llvm/utils/update_test_prefix.py
@@ -18,8 +18,7 @@
s = re.sub(',' + p + '([, \n])', '\\1', s)
s = re.sub('\s+-?-check-prefix=' + p + '([ \n])', '\\1', s)
else:
- s = re.sub('-?-check-prefixes=([^, ]+\n)', '--check-prefix=\\1', s)
- s = re.sub('-?-check-prefixes=([^, ]+) ', '--check-prefix=\\1', s)
+ s = re.sub('-?-check-prefixes=([\w-]+)(\Z|[ \t\n])', '--check-prefix=\\1\\2', s)
t = re.search('-?-check-(?:prefix|prefixes)=([^ ]+)\s+-?-check-(?:prefix|prefixes)=([^ ]+)', s)
while t:
s = re.sub(t.group(), '--check-prefixes=' + t.group(1) + ',' + t.group(2), s)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92542.309448.patch
Type: text/x-patch
Size: 825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201204/212c76a9/attachment.bin>
More information about the llvm-commits
mailing list