[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / arm-fix-cortex-a57-aes-1742098.c
blob84e43cb55b43362943eeebe987b3c088d7ce0a8a
1 // RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a -mfix-cortex-a57-aes-1742098 2>&1 | FileCheck %s --check-prefix=FIX
2 // RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a -mno-fix-cortex-a57-aes-1742098 2>&1 | FileCheck %s --check-prefix=NO-FIX
4 // RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a -mfix-cortex-a72-aes-1655431 2>&1 | FileCheck %s --check-prefix=FIX
5 // RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a -mno-fix-cortex-a72-aes-1655431 2>&1 | FileCheck %s --check-prefix=NO-FIX
7 // RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a 2>&1 | FileCheck %s --check-prefix=UNSPEC
8 // RUN: %clang -### %s -target arm-none-none-eabi -march=armv8a 2>&1 | FileCheck %s --check-prefix=UNSPEC
10 // This test checks that "-m(no-)fix-cortex-a57-aes-1742098" and
11 // "-m(no-)fix-cortex-a72-aes-1655431" cause the "fix-cortex-a57-aes-1742098"
12 // target feature to be passed to `clang -cc1`.
14 // This feature is also enabled in the backend for the two affected CPUs and the
15 // "generic" cpu (used when only specifying -march), but that won't show up on
16 // the `clang -cc1` command line.
18 // We do not check whether this option is correctly specified for the CPU: users
19 // can specify the "-mfix-cortex-a57-aes-1742098" option with "-mcpu=cortex-a72"
20 // and vice-versa, and will still get the fix, as the target feature and the fix
21 // is the same in both cases.
23 // FIX: "-target-feature" "+fix-cortex-a57-aes-1742098"
24 // NO-FIX: "-target-feature" "-fix-cortex-a57-aes-1742098"
25 // UNSPEC-NOT: "-target-feature" "{[+-]}fix-cortex-a57-aes-1742098"