[libc-commits] [libc] [libc][newhdrgen] Fix NameError in yaml_to_classes.py (PR #114952)

via libc-commits libc-commits at lists.llvm.org
Tue Nov 5 00:30:54 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: OverMighty (overmighty)

<details>
<summary>Changes</summary>

Fixes "NameError: name 'yaml_file' is not defined" that would be raised
whenever running yaml_to_classes.py with the --add_function option since
commit 2e6d451d1565814415e2692ef8e5c3942d4c11a2.


---
Full diff: https://github.com/llvm/llvm-project/pull/114952.diff


1 Files Affected:

- (modified) libc/newhdrgen/yaml_to_classes.py (+1-1) 


``````````diff
diff --git a/libc/newhdrgen/yaml_to_classes.py b/libc/newhdrgen/yaml_to_classes.py
index a295058f7dc821..0e8ca2d8a82b0c 100644
--- a/libc/newhdrgen/yaml_to_classes.py
+++ b/libc/newhdrgen/yaml_to_classes.py
@@ -253,7 +253,7 @@ def main():
     args = parser.parse_args()
 
     if args.add_function:
-        add_function_to_yaml(yaml_file, args.add_function)
+        add_function_to_yaml(args.yaml_file, args.add_function)
 
     header_class = GpuHeader if args.export_decls else HeaderFile
     header = load_yaml_file(args.yaml_file, header_class, args.entry_points)

``````````

</details>


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


More information about the libc-commits mailing list