diff options
author | Greg Bedwell <greg_bedwell@sn.scee.net> | 2018-06-04 12:30:10 +0000 |
---|---|---|
committer | Greg Bedwell <greg_bedwell@sn.scee.net> | 2018-06-04 12:30:10 +0000 |
commit | 14d1a66e677932d20a2ba6f440e310b2bd57931b (patch) | |
tree | 50459ce6783cfb49c96332bc27735dea0bb6c216 /utils/update_mca_test_checks.py | |
parent | feb319a84abf8bf24634ccf6b43a66e2fcdc8b2a (diff) |
[llvm-mca][UpdateTestChecks] Prevent an IndexError being raised when given empty input
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/update_mca_test_checks.py')
-rwxr-xr-x | utils/update_mca_test_checks.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/update_mca_test_checks.py b/utils/update_mca_test_checks.py index f99ca343f96..dcd52f6e913 100755 --- a/utils/update_mca_test_checks.py +++ b/utils/update_mca_test_checks.py @@ -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 = [] |