diff options
| -rwxr-xr-x | llvm/utils/update_llc_test_checks.py | 9 | ||||
| -rwxr-xr-x | llvm/utils/update_test_checks.py | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/llvm/utils/update_llc_test_checks.py b/llvm/utils/update_llc_test_checks.py index bb34cf12742..13ebe68589f 100755 --- a/llvm/utils/update_llc_test_checks.py +++ b/llvm/utils/update_llc_test_checks.py @@ -222,8 +222,15 @@ def main(): 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: diff --git a/llvm/utils/update_test_checks.py b/llvm/utils/update_test_checks.py index 7adf3e2661b..c71f3b62d51 100755 --- a/llvm/utils/update_test_checks.py +++ b/llvm/utils/update_test_checks.py @@ -292,8 +292,15 @@ def main(): 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: |

