forked from OSchip/llvm-project
[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:
parent
ab64fd39d2
commit
6f85ec960b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue