mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 17:56:50 +00:00
[llvm-mca][UpdateTestChecks] Prevent an IndexError being raised when given empty input
llvm-svn: 333894
This commit is contained in:
parent
bbe64af0a0
commit
96f51f09d4
@ -409,7 +409,7 @@ def _write_output(test_path, input_lines, prefix_list, block_infos, # noqa
|
||||
continue
|
||||
|
||||
# Add a blank line before the new checks if required.
|
||||
if output_lines[-1]:
|
||||
if len(output_lines) > 0 and output_lines[-1]:
|
||||
output_lines.append('')
|
||||
|
||||
output_check_lines = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user