[llvm] [opt-viewer] Account for optimization records YAML files generated by LTO (PR #135059)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 10:50:28 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r HEAD~1...HEAD llvm/tools/opt-viewer/optrecord.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- optrecord.py	2025-04-09 17:35:26.000000 +0000
+++ optrecord.py	2025-04-09 17:49:55.001069 +0000
@@ -359,8 +359,10 @@
                 # Exclude mounted directories and symlinks (os.walk default).
                 subdirs[:] = [
                     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*") or fnmatch.fnmatch(file, "*.opt.ld.yaml*"):
+                    if fnmatch.fnmatch(file, "*.opt.yaml*") or fnmatch.fnmatch(
+                        file, "*.opt.ld.yaml*"
+                    ):
                         all.append(os.path.join(dir, file))
     return all

``````````

</details>


https://github.com/llvm/llvm-project/pull/135059


More information about the llvm-commits mailing list