[PATCH] D103587: [AIX] Transfer predefined macros

Chris Bowler via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 3 07:09:27 PDT 2021


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

Please rework the test update into init-ppc.c



================
Comment at: clang/lib/Basic/Targets/PPC.cpp:95
   Builder.defineMacro("_ARCH_PPC");
+  Builder.defineMacro("__THW_PPC__");
   Builder.defineMacro("__powerpc__");
----------------
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.


================
Comment at: clang/test/Preprocessor/init-aix.c:1
+// RUN: %clang_cc1 -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix AIX %s
+// AIX:#define __THW_PPC__ 1
----------------
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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103587



More information about the cfe-commits mailing list