Skip to content

Commit c93df83

Browse files
authored
[opt-viewer] Account for optimization records YAML files generated by LTO (#135059)
The optimization records YAML files generated by Clang's LTO pipeline are named "\*.opt.ld.yaml" rather than "\*.opt.yaml". This patch adds that pattern into the search list of `find_opt_files` as well.
1 parent cf73a0b commit c93df83

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/tools/opt-viewer/optrecord.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,8 @@ def find_opt_files(*dirs_or_files):
344344
d for d in subdirs if not os.path.ismount(os.path.join(dir, d))
345345
]
346346
for file in files:
347-
if fnmatch.fnmatch(file, "*.opt.yaml*"):
347+
if fnmatch.fnmatch(file, "*.opt.yaml*") or fnmatch.fnmatch(
348+
file, "*.opt.ld.yaml*"
349+
):
348350
all.append(os.path.join(dir, file))
349351
return all

0 commit comments

Comments
 (0)