Transfer the predefined macro, __TOS_AIX__, from the AIX XL C/C++ compilers.
__TOS_AIX__ indicates that the target operating system is AIX.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Please rework the test update into init-ppc.c
clang/lib/Basic/Targets/PPC.cpp | ||
---|---|---|
95 ↗ | (On Diff #349445) | The XL compilers define this macro for Power but GCC does not. The macro is redundant and I recommend we not carry it forward to Linux. There's probably a case to define it on AIX where the prevalent XL compilers have always defined it. |
clang/test/Preprocessor/init-aix.c | ||
1 ↗ | (On Diff #349445) | There are some AIX macro tests already in init-ppc.c. Note the target triple should be specified or this test will break when run on a non AIX host. |
clang/lib/Basic/Targets/OSTargets.h | ||
---|---|---|
680 | Should set these macros in C11 and higher levels. | |
clang/test/Preprocessor/init-ppc.c | ||
544 | I think it's sufficient to test the STDC_NO_ATOMICS and STDC_NO_THREADS only as you've added below where the -std is explicitly controlled. I prefer to avoid expecting these macros for the -std default, which may change. | |
751 | suggest adding the negative test for pre C11 modes. |
I think it makes sense to split the STDC macro changes and TOS_AIX__ into different patches.
Should set these macros in C11 and higher levels.