[libc-commits] [libc] [libc] Make two include/llvm-libc-types/ headers more self-contained. (PR #128094)

Roland McGrath via libc-commits libc-commits at lists.llvm.org
Thu Feb 20 17:09:25 PST 2025


================
@@ -11,7 +11,6 @@
 
 #include "__llvm-libc-common.h"
 #include "llvm-libc-macros/inttypes-macros.h"
-#include <stdint.h>
----------------
frobtech wrote:

I think this is a good opportunity to add another little hdrgen feature and then eliminate `inttypes.h.def`.
That is, we can have an `includes` list in YAML, where this is the list of public `<foo.h>` headers that the actual API spec is for this other public header to include for re-export.  I think there may be other cases than just `<inttypes.h>` -> `<stdint.h>` in standard C though I can't think of one off hand; there are certainly more in POSIX.
These should be in the source of truth about the API contract, and thus the actual `#include` can be generated.  (Later we can exploit this in other ways like with generated tests.)

https://github.com/llvm/llvm-project/pull/128094


More information about the libc-commits mailing list