[all-commits] [llvm/llvm-project] 9f6e72: [libc] Add merge_yaml_files feature to hdrgen (#12...
Roland McGrath via All-commits
all-commits at lists.llvm.org
Fri Feb 14 15:35:01 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9f6e72bd0c1e6e52ac5aa0e29dc3d128ee868ee5
https://github.com/llvm/llvm-project/commit/9f6e72bd0c1e6e52ac5aa0e29dc3d128ee868ee5
Author: Roland McGrath <mcgrathr at google.com>
Date: 2025-02-14 (Fri, 14 Feb 2025)
Changed paths:
M libc/utils/hdrgen/enumeration.py
M libc/utils/hdrgen/function.py
M libc/utils/hdrgen/header.py
M libc/utils/hdrgen/macro.py
M libc/utils/hdrgen/main.py
M libc/utils/hdrgen/object.py
A libc/utils/hdrgen/tests/input/merge1.yaml
A libc/utils/hdrgen/tests/input/merge2.yaml
M libc/utils/hdrgen/tests/input/test_small.yaml
M libc/utils/hdrgen/type.py
M libc/utils/hdrgen/yaml_to_classes.py
Log Message:
-----------
[libc] Add merge_yaml_files feature to hdrgen (#127269)
This allows a sort of "include" mechanism in the YAML files. A
file can have a "merge_yaml_files" list of paths (relative to the
containing file's location). These are YAML files in the same
syntax, except they cannot have their own "header" entry. Only
the lists (types, enums, macros, functions, objects) can appear.
The main YAML file is then processed just as if each of its lists
were the (sorted) union of each YAML file's corresponding list.
This will enable maintaining a single source of truth for each
function signature and other such details, where it is necessary
to generate the same declaration in more than one header.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list