[PATCH] D108917: Define __powerpc and __PPC macros

Jake Egan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 30 07:26:03 PDT 2021


Jake-Egan created this revision.
Herald added subscribers: shchenz, kbarton, nemanjai.
Jake-Egan requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108917

Files:
  clang/lib/Basic/Targets/PPC.cpp
  clang/test/Preprocessor/init-ppc.c


Index: clang/test/Preprocessor/init-ppc.c
===================================================================
--- clang/test/Preprocessor/init-ppc.c
+++ clang/test/Preprocessor/init-ppc.c
@@ -517,6 +517,7 @@
 // PPC-AIX-NOT:#define __NATURAL_ALIGNMENT__ 1
 // PPC-AIX:#define __POINTER_WIDTH__ 32
 // PPC-AIX:#define __POWERPC__ 1
+// PPC-AIX:#define __PPC 1
 // PPC-AIX:#define __PPC__ 1
 // PPC-AIX:#define __PTRDIFF_TYPE__ long int
 // PPC-AIX:#define __PTRDIFF_WIDTH__ 32
@@ -584,6 +585,7 @@
 // PPC-AIX:#define __WCHAR_WIDTH__ 16
 // PPC-AIX:#define __WINT_TYPE__ int
 // PPC-AIX:#define __WINT_WIDTH__ 32
+// PPC-AIX:#define __powerpc 1
 // PPC-AIX:#define __powerpc__ 1
 // PPC-AIX:#define __ppc__ 1
 
Index: clang/lib/Basic/Targets/PPC.cpp
===================================================================
--- clang/lib/Basic/Targets/PPC.cpp
+++ clang/lib/Basic/Targets/PPC.cpp
@@ -250,9 +250,11 @@
   // Target identification.
   Builder.defineMacro("__ppc__");
   Builder.defineMacro("__PPC__");
+  Builder.defineMacro("__PPC");
   Builder.defineMacro("_ARCH_PPC");
   Builder.defineMacro("__powerpc__");
   Builder.defineMacro("__POWERPC__");
+  Builder.defineMacro("__powerpc");
   if (PointerWidth == 64) {
     Builder.defineMacro("_ARCH_PPC64");
     Builder.defineMacro("__powerpc64__");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108917.369440.patch
Type: text/x-patch
Size: 1306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210830/fdef704f/attachment-0001.bin>


More information about the cfe-commits mailing list