Skip to content

Commit e67f647

Browse files
committed
[Utils] Hide the default behavior change of D68819 under a flag
With D69701, the options used when running the script on a file will be recorded and reused on a rerun. This allows us to hide new features behind flags, starting with the "define" that was introduced in D68819.
1 parent 3a399c0 commit e67f647

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

llvm/utils/UpdateTestChecks/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ def add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
305305
break
306306

307307
def add_ir_checks(output_lines, comment_marker, prefix_list, func_dict,
308-
func_name, preserve_names):
308+
func_name, preserve_names, function_sig):
309309
# Label format is based on IR string.
310-
function_def_regex = 'define {{[^@]+}}'
310+
function_def_regex = 'define {{[^@]+}}' if function_sig else ''
311311
check_label_format = '{} %s-LABEL: {}@%s%s'.format(comment_marker, function_def_regex)
312312
add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
313313
check_label_format, False, preserve_names)

llvm/utils/update_cc_test_checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def main():
187187
for filename in args.tests:
188188
with open(filename) as f:
189189
input_lines = [l.rstrip() for l in f]
190-
190+
191191
first_line = input_lines[0] if input_lines else ""
192192
if 'autogenerated' in first_line and script_name not in first_line:
193193
common.warn("Skipping test which wasn't autogenerated by " + script_name, filename)
@@ -298,7 +298,7 @@ def main():
298298
if added:
299299
output_lines.append('//')
300300
added.add(mangled)
301-
common.add_ir_checks(output_lines, '//', run_list, func_dict, mangled, False)
301+
common.add_ir_checks(output_lines, '//', run_list, func_dict, mangled, False, False)
302302
output_lines.append(line.rstrip('\n'))
303303

304304
# Update the test file.

llvm/utils/update_test_checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def main():
180180

181181
# Print out the various check lines here.
182182
common.add_ir_checks(output_lines, ';', prefix_list, func_dict,
183-
func_name, args.preserve_names)
183+
func_name, args.preserve_names, args.function_signature)
184184
is_in_function_start = False
185185

186186
if is_in_function:

0 commit comments

Comments
 (0)