[PATCH] D59048: Add AIX Target Info

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 14:44:57 PST 2019


hubert.reinterpretcast added inline comments.


================
Comment at: clang/test/Preprocessor/init.c:6420
+// PPC64-AIX:#define _LONG_LONG 1
+// PPC64-AIX:#define _POWER 1
+// PPC64-AIX:#define __64BIT__ 1
----------------
hubert.reinterpretcast wrote:
> apaprocki wrote:
> > XL on AIX emits `#define _LP64 1` in 64-bit mode and `#define _ILP32 1` in 32-bit mode in the pre-defined macros. Is that important to capture?
> I think so. The v16.1 XL compiler's `xlclang` also produces these.
> 
> ```
> #define __LP64__ 1
> #define _LP64 1
> ```
> 
> ```
> #define __ILP32__ 1
> #define _ILP32 1
> ```
It seems GCC on AIX only defines the macros for 64-bit, and not the 32-bit versions. The system headers do not appear to depend on the 32-bit versions. It makes sense to start with the common intersection between the GCC and XL predefined macros first. We can add `__LP64__` and `_LP64` with this patch. I think we can leave more macros for later.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59048





More information about the cfe-commits mailing list