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.
LLVM libc ========= This directory and its subdirectories contain source code for llvm-libc, a retargetable implementation of the C standard library. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.