[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / mcmodel.c
blob63b4320361592ab7967aaf87b5582953ac60c7e1
1 // RUN: %clang --target=x86_64 -### -c -mcmodel=tiny %s 2>&1 | FileCheck --check-prefix=TINY %s
2 // RUN: %clang --target=x86_64 -### -c -mcmodel=small %s 2>&1 | FileCheck --check-prefix=SMALL %s
3 // RUN: %clang --target=x86_64 -### -S -mcmodel=kernel %s 2>&1 | FileCheck --check-prefix=KERNEL %s
4 // RUN: %clang --target=x86_64 -### -c -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=MEDIUM %s
5 // RUN: %clang --target=x86_64 -### -S -mcmodel=large %s 2>&1 | FileCheck --check-prefix=LARGE %s
6 // RUN: %clang --target=powerpc-unknown-aix -### -S -mcmodel=medium %s 2> %t.log
7 // RUN: FileCheck --check-prefix=AIX-MCMEDIUM-OVERRIDE %s < %t.log
8 // RUN: not %clang -c -mcmodel=lager %s 2>&1 | FileCheck --check-prefix=INVALID %s
9 // RUN: not %clang -c --target=aarch64 -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=AARCH64-MEDIUM %s
10 // RUN: not %clang -c --target=aarch64 -mcmodel=kernel %s 2>&1 | FileCheck --check-prefix=AARCH64-KERNEL %s
12 // TINY: "-mcmodel=tiny"
13 // SMALL: "-mcmodel=small"
14 // KERNEL: "-mcmodel=kernel"
15 // MEDIUM: "-mcmodel=medium"
16 // LARGE: "-mcmodel=large"
17 // AIX-MCMEDIUM-OVERRIDE: "-mcmodel=large"
19 // INVALID: error: invalid argument 'lager' to -mcmodel=
21 // AARCH64-MEDIUM: error: invalid argument 'medium' to -mcmodel=
22 // AARCH64-KERNEL: error: invalid argument 'kernel' to -mcmodel=