[PATCH] D26523: `update_{llc_test, test}_checks`: Correctly handle multi-lined RUN lines.
bryant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 29 11:43:13 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL290716: Correctly handle multi-lined RUN lines. (authored by bryant).
Changed prior to commit:
https://reviews.llvm.org/D26523?vs=77553&id=82684#toc
Repository:
rL LLVM
https://reviews.llvm.org/D26523
Files:
llvm/trunk/utils/update_llc_test_checks.py
llvm/trunk/utils/update_test_checks.py
Index: llvm/trunk/utils/update_test_checks.py
===================================================================
--- llvm/trunk/utils/update_test_checks.py
+++ llvm/trunk/utils/update_test_checks.py
@@ -292,8 +292,15 @@
with open(test) as f:
input_lines = [l.rstrip() for l in f]
- run_lines = [m.group(1)
+ raw_lines = [m.group(1)
for m in [RUN_LINE_RE.match(l) for l in input_lines] if m]
+ run_lines = [raw_lines[0]] if len(raw_lines) > 0 else []
+ for l in raw_lines[1:]:
+ if run_lines[-1].endswith("\\"):
+ run_lines[-1] = run_lines[-1].rstrip("\\") + " " + l
+ else:
+ run_lines.append(l)
+
if args.verbose:
print >>sys.stderr, 'Found %d RUN lines:' % (len(run_lines),)
for l in run_lines:
Index: llvm/trunk/utils/update_llc_test_checks.py
===================================================================
--- llvm/trunk/utils/update_llc_test_checks.py
+++ llvm/trunk/utils/update_llc_test_checks.py
@@ -222,8 +222,15 @@
triple_in_ir = m.groups()[0]
break
- run_lines = [m.group(1)
+ raw_lines = [m.group(1)
for m in [RUN_LINE_RE.match(l) for l in input_lines] if m]
+ run_lines = [raw_lines[0]] if len(raw_lines) > 0 else []
+ for l in raw_lines[1:]:
+ if run_lines[-1].endswith("\\"):
+ run_lines[-1] = run_lines[-1].rstrip("\\") + " " + l
+ else:
+ run_lines.append(l)
+
if args.verbose:
print >>sys.stderr, 'Found %d RUN lines:' % (len(run_lines),)
for l in run_lines:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26523.82684.patch
Type: text/x-patch
Size: 1587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161229/33e61c61/attachment.bin>
More information about the llvm-commits
mailing list