[PATCH] D47192: [utils] Reflow asm check generation to tolerate blank lines

Simon Atanasyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 1 06:05:15 PDT 2019


atanasyan added a comment.

What do you think about teaching UpdateTestChecks to generate CHECK-EMPTY when a line is empty?

In D47192#1157635 <https://reviews.llvm.org/D47192#1157635>, @atanasyan wrote:

> 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

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D47192/new/

https://reviews.llvm.org/D47192





More information about the llvm-commits mailing list