[all-commits] [llvm/llvm-project] 968b6a: [libc][hdrgen] Print __BEGIN_C_DECLS / __END_C_DEC...
Alexey Samsonov via All-commits
all-commits at lists.llvm.org
Thu Mar 26 13:03:01 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 968b6aaef1c543e126d8f63bcdadea1e8164d8b6
https://github.com/llvm/llvm-project/commit/968b6aaef1c543e126d8f63bcdadea1e8164d8b6
Author: Alexey Samsonov <vonosmas at gmail.com>
Date: 2026-03-26 (Thu, 26 Mar 2026)
Changed paths:
M libc/utils/hdrgen/hdrgen/header.py
A libc/utils/hdrgen/tests/expected_output/macro_only.h
A libc/utils/hdrgen/tests/input/macro_only.yaml
M libc/utils/hdrgen/tests/test_integration.py
Log Message:
-----------
[libc][hdrgen] Print __BEGIN_C_DECLS / __END_C_DECLS conditionally. (#188830)
Clean up the `%public_api` printer code slightly - get rid of explicit
`\n` and ensure we only print `__BEGIN_C_DECLS` and `__END_C_DECLS` if
the generated header actually contains functions or objects to declare.
I've noticed that after 27ba9e2a44c11f8123528c350227db2c9a707c8f landed,
generated errno.h header has two blocks of `__BEGIN_C_DECLS` /
`__END_C_DECLS`: an empty one was generated automatically from
`%public_api` section that was intended to only add the `errno_t` type
declaration.
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