xref: /llvm-project/clang/test/Preprocessor/arm-pic-predefines.c (revision e3c8ce8b7547bea03fe4c9271c46c09e11fd4443)
1 // REQUIRES: arm-registered-target
2 
3 // RUN: %clang -target armv8--none-eabi   -x c -E -dM %s -o -               | FileCheck %s --check-prefix=NO-ROPI --check-prefix=NO-RWPI
4 // RUN: %clang -target armv8--none-eabi   -x c -E -dM %s -o - -fropi        | FileCheck %s --check-prefix=ROPI    --check-prefix=NO-RWPI
5 // RUN: %clang -target armv8--none-eabi   -x c -E -dM %s -o - -frwpi        | FileCheck %s --check-prefix=NO-ROPI --check-prefix=RWPI
6 // RUN: %clang -target armv8--none-eabi   -x c -E -dM %s -o - -fropi -frwpi | FileCheck %s --check-prefix=ROPI    --check-prefix=RWPI
7 
8 // Pre-defined macros for position-independence modes
9 
10 // NO-ROPI-NOT: #define __APCS_ROPI
11 // ROPI: #define __ARM_ROPI
12 
13 // NO-RWPI-NOT: #define __APCS_RWPI
14 // RWPI: #define __ARM_RWPI
15