File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,9 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts,
264
264
}
265
265
if (getTriple ().isOSAIX ()) {
266
266
Builder.defineMacro (" __THW_PPC__" );
267
+ // Define __PPC and __powerpc for AIX XL C/C++ compatibility
268
+ Builder.defineMacro (" __PPC" );
269
+ Builder.defineMacro (" __powerpc" );
267
270
}
268
271
269
272
// Target properties.
Original file line number Diff line number Diff line change 322
322
// PPC:#define __NATURAL_ALIGNMENT__ 1
323
323
// PPC:#define __POINTER_WIDTH__ 32
324
324
// PPC:#define __POWERPC__ 1
325
+ // PPC-NOT:#define __PPC 1
325
326
// PPC:#define __PPC__ 1
326
327
// PPC:#define __PTRDIFF_TYPE__ long int
327
328
// PPC:#define __PTRDIFF_WIDTH__ 32
386
387
// PPC:#define __WCHAR_WIDTH__ 32
387
388
// PPC:#define __WINT_TYPE__ int
388
389
// PPC:#define __WINT_WIDTH__ 32
390
+ // PPC-NOT:#define __powerpc 1
389
391
// PPC:#define __ppc__ 1
390
392
391
393
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX %s
520
522
// PPC-AIX-NOT:#define __NATURAL_ALIGNMENT__ 1
521
523
// PPC-AIX:#define __POINTER_WIDTH__ 32
522
524
// PPC-AIX:#define __POWERPC__ 1
525
+ // PPC-AIX:#define __PPC 1
523
526
// PPC-AIX:#define __PPC__ 1
524
527
// PPC-AIX:#define __PTRDIFF_TYPE__ long int
525
528
// PPC-AIX:#define __PTRDIFF_WIDTH__ 32
587
590
// PPC-AIX:#define __WCHAR_WIDTH__ 16
588
591
// PPC-AIX:#define __WINT_TYPE__ int
589
592
// PPC-AIX:#define __WINT_WIDTH__ 32
593
+ // PPC-AIX:#define __powerpc 1
590
594
// PPC-AIX:#define __powerpc__ 1
591
595
// PPC-AIX:#define __ppc__ 1
592
596
You can’t perform that action at this time.
0 commit comments