[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.
This commit is contained in:
Min-Yih Hsu 2025-11-04 14:03:45 -08:00 committed by GitHub
parent cf73a0b102
commit c93df83b04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -344,6 +344,8 @@ def find_opt_files(*dirs_or_files):
d for d in subdirs if not os.path.ismount(os.path.join(dir, d))
]
for file in files:
if fnmatch.fnmatch(file, "*.opt.yaml*"):
if fnmatch.fnmatch(file, "*.opt.yaml*") or fnmatch.fnmatch(
file, "*.opt.ld.yaml*"
):
all.append(os.path.join(dir, file))
return all