[clang] 420e1d4 - [AIX] Define __THW_BIG_ENDIAN__ macro
Jake Egan via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 6 06:47:43 PDT 2021
Author: Jake Egan
Date: 2021-08-06T09:46:59-04:00
New Revision: 420e1d4cf45d78a6f9edb935f44dfa4249de16f4
URL: https://github.com/llvm/llvm-project/commit/420e1d4cf45d78a6f9edb935f44dfa4249de16f4
DIFF: https://github.com/llvm/llvm-project/commit/420e1d4cf45d78a6f9edb935f44dfa4249de16f4.diff
LOG: [AIX] Define __THW_BIG_ENDIAN__ macro
%%%
This patch defines the macro __THW_BIG_ENDIAN__ for AIX.
%%%
Tested with SPEC.
Reviewed By: cebowleratibm
Differential Revision: https://reviews.llvm.org/D107241
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 9780d5036aa23..28d4c77d47caf 100644
--- a/clang/lib/Basic/Targets/OSTargets.h
+++ b/clang/lib/Basic/Targets/OSTargets.h
@@ -673,6 +673,7 @@ class AIXTargetInfo : public OSTargetInfo<Target> {
DefineStd(Builder, "unix", Opts);
Builder.defineMacro("_IBMR2");
Builder.defineMacro("_POWER");
+ Builder.defineMacro("__THW_BIG_ENDIAN__");
Builder.defineMacro("_AIX");
Builder.defineMacro("__TOS_AIX__");
diff --git a/clang/test/Preprocessor/init-ppc.c b/clang/test/Preprocessor/init-ppc.c
index 6ebc80717dbc3..ac72e6cb027b0 100644
--- a/clang/test/Preprocessor/init-ppc.c
+++ b/clang/test/Preprocessor/init-ppc.c
@@ -538,6 +538,7 @@
// PPC-AIX:#define __SIZE_MAX__ 4294967295UL
// PPC-AIX:#define __SIZE_TYPE__ long unsigned int
// PPC-AIX:#define __SIZE_WIDTH__ 32
+// PPC-AIX:#define __THW_BIG_ENDIAN__ 1
// PPC-AIX:#define __TOS_AIX__ 1
// PPC-AIX:#define __UINT16_C_SUFFIX__
// PPC-AIX:#define __UINT16_MAX__ 65535
More information about the cfe-commits
mailing list