[PATCH] D47192: [utils] Reflow asm check generation to tolerate blank lines
Simon Atanasyan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 10 10:32:59 PDT 2018
atanasyan added a comment.
Does the following patch uses new CHECK-EMPTY directive solves the problem?
--- a/utils/UpdateTestChecks/common.py
+++ b/utils/UpdateTestChecks/common.py
@@ -215,7 +215,10 @@ def add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
if is_asm == True:
output_lines.append('%s %s: %s' % (comment_marker, checkprefix, func_body[0]))
for func_line in func_body[1:]:
- output_lines.append('%s %s-NEXT: %s' % (comment_marker, checkprefix, func_line))
+ if func_line.strip() == '':
+ output_lines.append('%s %s-EMPTY:' % (comment_marker, checkprefix))
+ else:
+ output_lines.append('%s %s-NEXT: %s' % (comment_marker, checkprefix, func_line))
break
# For IR output, change all defs to FileCheck variables, so we're immune
Repository:
rL LLVM
https://reviews.llvm.org/D47192
More information about the llvm-commits
mailing list