Skip to content

Commit 782cf12

Browse files
committed
Fix chunk-print-before-all script
After c718336 the output of print-before/print-after was changed. A semicolon was added before the banner "*** IR Dump ..." and this change broke chunk-print-before-all script. This change makes it more resilient to small output format variations.
1 parent bb7f8f7 commit 782cf12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/utils/chunk-print-before-all.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ def print_chunk(lines, prefix, pass_name):
3030
is_dump = False
3131
cur = []
3232
for line in sys.stdin:
33-
if line.startswith("*** IR Dump Before "):
33+
if "*** IR Dump Before " in line:
3434
if len(cur) != 0:
3535
print_chunk(cur, "before", pass_name)
3636
cur = []
3737
cur.append("; " + line)
3838
pass_name = get_pass_name(line, "Before")
39-
elif line.startswith("*** IR Dump After "):
39+
elif "*** IR Dump After " in line:
4040
if len(cur) != 0:
4141
print_chunk(cur, "after", pass_name)
4242
cur = []

0 commit comments

Comments
 (0)