1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[Tools] Fixed bug with llvm/utils/chunk-print-before-all.py script.

Prior to the fix, the script was not annotating the first line of
chunk-0.ll. Because of that, a compilation with ./bin/opt was failing.

The extra if-statement ensures that the corner case is covered

Reviewed-By: apilipenko

Differential Revision: https://reviews.llvm.org/D76507
This commit is contained in:
Kirill Naumov 2020-03-20 15:26:30 +00:00
parent 2666714257
commit a5b7263b63

View File

@ -24,9 +24,10 @@ def print_chunk(lines):
is_dump = False
cur = []
for line in sys.stdin:
if line.startswith("*** IR Dump Before ") and len(cur) != 0:
print_chunk(cur);
cur = []
if line.startswith("*** IR Dump Before "):
if len(cur) != 0:
print_chunk(cur);
cur = []
cur.append("; " + line)
elif line.startswith("Stack dump:"):
print_chunk(cur);