[PATCH] D107244: [AIX] Define _ARCH_PPC64 macro for 32-bit

Chris Bowler via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 4 07:42:36 PDT 2021


cebowleratibm requested changes to this revision.
cebowleratibm added a comment.
This revision now requires changes to proceed.

The divergence with GCC is regrettable.  Unfortunately defining _ARCH_PPC64 in 32-bit has been a long-standing discrepancy between xlc and gcc and one I don't expect gcc to change.  This patch is preferable in order to retain preprocessing behaviour on AIX for customers porting 32-bit AIX xlc applications to clang.

My request for change is simply to add a brief explanation in the code, otherwise, it looks like a coding error.



================
Comment at: clang/lib/Basic/Targets/PPC.cpp:260
+  } else {
+    if (getTriple().isOSAIX())
+      Builder.defineMacro("_ARCH_PPC64");
----------------
A comment is warranted here to explain that __ARCH_PPC64 is only defined in 32-bit on AIX.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107244



More information about the cfe-commits mailing list