1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[utils] simple refactor in update_mca_test_checks.py to make intent more readable

llvm-svn: 343782
This commit is contained in:
Greg Bedwell 2018-10-04 14:42:06 +00:00
parent 91c5da8408
commit 698890f4d4

View File

@ -492,10 +492,6 @@ def _write_output(test_path, input_lines, prefix_list, block_infos, # noqa
output_check_lines = []
used_prefixes = set()
for block_num in range(len(block_infos)):
for block_text in sorted(block_infos[block_num]):
if not block_text:
continue
if type(block_infos[block_num]) is list:
# The block is of the type output from _break_down_block().
used_prefixes |= _write_block(output_check_lines,
@ -503,10 +499,13 @@ def _write_output(test_path, input_lines, prefix_list, block_infos, # noqa
not_prefix_set,
common_prefix,
prefix_pad)
break
elif block_infos[block_num][block_text]:
else:
# _break_down_block() was unable to do do anything so output the block
# as-is.
for block_text in sorted(block_infos[block_num]):
if not block_text:
continue
lines = block_text.split('\n')
for prefix in block_infos[block_num][block_text]:
used_prefixes |= _write_block(output_check_lines,