[clang] 045872f - [AIX] Define __TOS_AIX__ predefined macro
Steven Wan via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 6 11:16:30 PDT 2021
Author: Jake Egan
Date: 2021-07-06T14:15:35-04:00
New Revision: 045872f42203223450c96a518b6478d255a5d586
URL: https://github.com/llvm/llvm-project/commit/045872f42203223450c96a518b6478d255a5d586
DIFF: https://github.com/llvm/llvm-project/commit/045872f42203223450c96a518b6478d255a5d586.diff
LOG: [AIX] Define __TOS_AIX__ predefined macro
%%%
Transfer the predefined macro, __TOS_AIX__, from the AIX XL C/C++ compilers.
__TOS_AIX__ indicates that the target operating system is AIX.
%%%
Reviewed By: cebowleratibm
Differential Revision: https://reviews.llvm.org/D103587
Added:
Modified:
clang/lib/Basic/Targets/OSTargets.h
clang/test/Preprocessor/init-ppc.c
Removed:
################################################################################
diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h
index fd1b15c512a2f..31f8b4bea30d9 100644
--- a/clang/lib/Basic/Targets/OSTargets.h
+++ b/clang/lib/Basic/Targets/OSTargets.h
@@ -675,6 +675,7 @@ class AIXTargetInfo : public OSTargetInfo<Target> {
Builder.defineMacro("_POWER");
Builder.defineMacro("_AIX");
+ Builder.defineMacro("__TOS_AIX__");
if (Opts.C11) {
Builder.defineMacro("__STDC_NO_ATOMICS__");
diff --git a/clang/test/Preprocessor/init-ppc.c b/clang/test/Preprocessor/init-ppc.c
index f59edd119ab0b..4803a8511c7ed 100644
--- a/clang/test/Preprocessor/init-ppc.c
+++ b/clang/test/Preprocessor/init-ppc.c
@@ -541,6 +541,7 @@
// PPC-AIX:#define __SIZE_MAX__ 4294967295UL
// PPC-AIX:#define __SIZE_TYPE__ long unsigned int
// PPC-AIX:#define __SIZE_WIDTH__ 32
+// PPC-AIX:#define __TOS_AIX__ 1
// PPC-AIX:#define __UINT16_C_SUFFIX__
// PPC-AIX:#define __UINT16_MAX__ 65535
// PPC-AIX:#define __UINT16_TYPE__ unsigned short
More information about the cfe-commits
mailing list