llvm-project
303f2415 - [libc] Make template_header optional for hdrgen (#127259)

Commit
206 days ago
[libc] Make template_header optional for hdrgen (#127259) This allows a YAML file to omit `template_header` and have no `.h.def` file. A default template is generated based purely on the information in the YAML file. This should handle most of the cases. For now, it's exercised (aside from the hdrgen tests) only for one of the simplest cases: <ctype.h>. This includes making the parser notice the "standards" YAML field at the top (header) level, not just in "functions" lists. The standards listed for the header overall and for the individual functions both feed into how a fully-generated header describes itself in comments. To go with this, files using the default generated template must stick to a new uniform set of spellings for the "standards" lists. As more custom template files are retired, the corresponding YAML files will need all their standards lists normalized. For now, ctype.yaml is updated with correct attribution for the POSIX `_l` extensions.
Author
Parents
Loading