[PATCH] D70941: [UpdateTestChecks] Fix issue on handling backslashes of RUN lines.

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 00:06:33 PST 2019


qiucf created this revision.
qiucf added reviewers: MaskRay, xbolva00, jdoerfert, arichardson.
Herald added subscribers: llvm-commits, wuzish.
Herald added a project: LLVM.

Incorrect arguments of `rstrip` in D70432 <https://reviews.llvm.org/D70432> won't remove trailing backslashes properly. This patch fixes the problem.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70941

Files:
  llvm/utils/UpdateTestChecks/common.py


Index: llvm/utils/UpdateTestChecks/common.py
===================================================================
--- llvm/utils/UpdateTestChecks/common.py
+++ llvm/utils/UpdateTestChecks/common.py
@@ -110,7 +110,7 @@
   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)
+      run_lines[-1] = run_lines[-1].rstrip('\\') + ' ' + l
     else:
       run_lines.append(l)
   debug('Found {} RUN lines in {}:'.format(len(run_lines), test))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70941.231830.patch
Type: text/x-patch
Size: 567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191203/b3f6f69f/attachment.bin>


More information about the llvm-commits mailing list