[llvm-mca][UpdateTestChecks] Prevent an IndexError being raised when given empty input

llvm-svn: 333894
This commit is contained in:
Greg Bedwell 2018-06-04 12:30:10 +00:00
parent bbe64af0a0
commit 96f51f09d4
1 changed files with 1 additions and 1 deletions

View File

@ -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 = []