[libc-commits] [PATCH] D69421: [libc] Header generation scheme.
David Chisnall via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Oct 28 02:32:57 PDT 2019
theraven added inline comments.
================
Comment at: libc/spec/stdc.td:5
+ let Functions = [
+ Function<"acos", "double", ["double"]>
+ ];
----------------
theraven wrote:
> A minor issue, but it would be nice if the argument types were TableGen types and not strings, so that we can avoid accidental header pollution. For example, there are a number of libc headers that define interfaces that use `size_t`, but that do not export `size_t`. To make these work, implementations typically define `__size_t` in an internal header and then `typedef __size_t size_t` (guarded against multiple definition) in the headers that are expected by the standard to export it.
Additionally, it would be nice to decouple attributes here. For example, `restrict` and `_Nonnull` can be specified inline (though the GCC equivalent can't), but things like the printf-like attributes are properties of the arguments that need to be specified as function attributes.
In an ideal world, we'd also have SAL annotations, but these are currently lacking a clang implementation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69421/new/
https://reviews.llvm.org/D69421
More information about the libc-commits
mailing list