[clang] [C99] Remove the tgmath.h header (PR #135236)

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 10 12:48:54 PDT 2025


zygoloid wrote:

> > I wonder if we can put it into an AIX-only (plus whatever other targets still need it) include directory, though, so we only find and use it on the targets where it's necessary?
> 
> That, or, generally `#include_next` except for certain platforms (like AIX)?

Possibly. But if so, we should use a pattern like
```c++
#if we want our tgmath
#include <__clang_tgmath.h>
#else
#include_next <tgmath.h>
#endif
```
so we're not unnecessarily tokenizing the whole file, and so we can just put the `__clang_tgmath.h` in our module map to avoid needing to deal with layering issues on platforms that don't use it.

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


More information about the cfe-commits mailing list