rsmith added a comment.

In D140250#4081009 <https://reviews.llvm.org/D140250#4081009>, @iana wrote:

> In D140250#4080990 <https://reviews.llvm.org/D140250#4080990>, @rsmith wrote:
>
>> Wait a second... if an OS wants only `NULL`, we already have a supported way 
>> of achieving that, which is compatible with GCC and glibc and other POSIX 
>> compilers -- define `__need_NULL` before including the header.
>>
>> We shouldn't be providing internal headers with `__mangled_names` for OSes 
>> to include, those should be implementation details.
>
> You can't do that with modules though, `#define __need_NULL #include 
> <stddef.h>` doesn't work.

Our builtin header `stddef.h` shouldn't be built as a module. It fundamentally 
needs to be treated as a textual header, because it consumers macros defined by 
the includer. The module map that we provide with our builtin headers does not 
cover `stddef.h` for that reason.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140250/new/

https://reviews.llvm.org/D140250

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to