[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Driver / avr-mmcu.c
blob6c13ab5b68d3b9a05b799b8b90346199a98d37d3
1 // A test for the propagation of the -mmcu option to -cc1 and -cc1as
3 // RUN: %clang -### --target=avr -mmcu=attiny11 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK0 %s
4 // CHECK0: "-cc1" {{.*}} "-target-cpu" "attiny11"
5 // CHECK0: "-cc1as" {{.*}} "-target-cpu" "attiny11"
7 // RUN: %clang -### --target=avr -mmcu=at90s2313 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK1 %s
8 // CHECK1: "-cc1" {{.*}} "-target-cpu" "at90s2313"
9 // CHECK1: "-cc1as" {{.*}} "-target-cpu" "at90s2313"
11 // RUN: %clang -### --target=avr -mmcu=at90s8515 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
12 // CHECK2: "-cc1" {{.*}} "-target-cpu" "at90s8515"
13 // CHECK2: "-cc1as" {{.*}} "-target-cpu" "at90s8515"
15 // RUN: %clang -### --target=avr -mmcu=attiny13a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK3 %s
16 // CHECK3: "-cc1" {{.*}} "-target-cpu" "attiny13a"
17 // CHECK3: "-cc1as" {{.*}} "-target-cpu" "attiny13a"
19 // RUN: %clang -### --target=avr -mmcu=attiny88 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK4 %s
20 // CHECK4: "-cc1" {{.*}} "-target-cpu" "attiny88"
21 // CHECK4: "-cc1as" {{.*}} "-target-cpu" "attiny88"
23 // RUN: %clang -### --target=avr -mmcu=attiny88 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK5 %s
24 // CHECK5: "-cc1" {{.*}} "-target-cpu" "attiny88"
25 // CHECK5: "-cc1as" {{.*}} "-target-cpu" "attiny88"
27 // RUN: %clang -### --target=avr -mmcu=atmega8u2 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK6 %s
28 // CHECK6: "-cc1" {{.*}} "-target-cpu" "atmega8u2"
29 // CHECK6: "-cc1as" {{.*}} "-target-cpu" "atmega8u2"
31 // RUN: %clang -### --target=avr -mmcu=atmega8u2 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK7 %s
32 // CHECK7: "-cc1" {{.*}} "-target-cpu" "atmega8u2"
33 // CHECK7: "-cc1as" {{.*}} "-target-cpu" "atmega8u2"
35 // RUN: %clang -### --target=avr -mmcu=atmega8a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK8 %s
36 // CHECK8: "-cc1" {{.*}} "-target-cpu" "atmega8a"
37 // CHECK8: "-cc1as" {{.*}} "-target-cpu" "atmega8a"
39 // RUN: %clang -### --target=avr -mmcu=atmega8a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK9 %s
40 // CHECK9: "-cc1" {{.*}} "-target-cpu" "atmega8a"
41 // CHECK9: "-cc1as" {{.*}} "-target-cpu" "atmega8a"
43 // RUN: %clang -### --target=avr -mmcu=atmega16a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKa %s
44 // CHECKa: "-cc1" {{.*}} "-target-cpu" "atmega16a"
45 // CHECKa: "-cc1as" {{.*}} "-target-cpu" "atmega16a"
47 // RUN: %clang -### --target=avr -mmcu=atmega16a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKb %s
48 // CHECKb: "-cc1" {{.*}} "-target-cpu" "atmega16a"
49 // CHECKb: "-cc1as" {{.*}} "-target-cpu" "atmega16a"
51 // RUN: %clang -### --target=avr -mmcu=atmega128a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKc %s
52 // CHECKc: "-cc1" {{.*}} "-target-cpu" "atmega128a"
53 // CHECKc: "-cc1as" {{.*}} "-target-cpu" "atmega128a"
55 // RUN: %clang -### --target=avr -mmcu=atmega2560 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKd %s
56 // CHECKd: "-cc1" {{.*}} "-target-cpu" "atmega2560"
57 // CHECKd: "-cc1as" {{.*}} "-target-cpu" "atmega2560"
59 // RUN: %clang -### --target=avr -mmcu=attiny10 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKe %s
60 // CHECKe: "-cc1" {{.*}} "-target-cpu" "attiny10"
61 // CHECKe: "-cc1as" {{.*}} "-target-cpu" "attiny10"
63 // RUN: %clang -### --target=avr -mmcu=atxmega16a4 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKf %s
64 // CHECKf: "-cc1" {{.*}} "-target-cpu" "atxmega16a4"
65 // CHECKf: "-cc1as" {{.*}} "-target-cpu" "atxmega16a4"
67 // RUN: %clang -### --target=avr -mmcu=atxmega64b1 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKg %s
68 // CHECKg: "-cc1" {{.*}} "-target-cpu" "atxmega64b1"
69 // CHECKg: "-cc1as" {{.*}} "-target-cpu" "atxmega64b1"
71 // RUN: %clang -### --target=avr -mmcu=atxmega64a1u -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKh %s
72 // CHECKh: "-cc1" {{.*}} "-target-cpu" "atxmega64a1u"
73 // CHECKh: "-cc1as" {{.*}} "-target-cpu" "atxmega64a1u"
75 // RUN: %clang -### --target=avr -mmcu=atxmega128a3u -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKj %s
76 // CHECKj: "-cc1" {{.*}} "-target-cpu" "atxmega128a3u"
77 // CHECKj: "-cc1as" {{.*}} "-target-cpu" "atxmega128a3u"
79 // RUN: %clang -### --target=avr -mmcu=atxmega128a4u -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKi %s
80 // CHECKi: "-cc1" {{.*}} "-target-cpu" "atxmega128a4u"
81 // CHECKi: "-cc1as" {{.*}} "-target-cpu" "atxmega128a4u"