1 // A test for the propagation of the -mmcu option to -cc1 and -cc1as 2 3 // RUN: not %clang -### --target=avr -mmcu=attiny11 %s 2>&1 | FileCheck -check-prefix=CHECK0 %s 4 // CHECK0: error: '-mmcu=attiny11' invalid for input of type c/c++ 5 6 // RUN: %clang -### --target=avr -mmcu=at90s2313 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK1 %s 7 // CHECK1: "-cc1" {{.*}} "-target-cpu" "at90s2313" 8 // CHECK1: "-cc1as" {{.*}} "-target-cpu" "at90s2313" 9 10 // RUN: %clang -### --target=avr -mmcu=at90s8515 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK2 %s 11 // CHECK2: "-cc1" {{.*}} "-target-cpu" "at90s8515" 12 // CHECK2: "-cc1as" {{.*}} "-target-cpu" "at90s8515" 13 14 // RUN: %clang -### --target=avr -mmcu=attiny13a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK3 %s 15 // CHECK3: "-cc1" {{.*}} "-target-cpu" "attiny13a" 16 // CHECK3: "-cc1as" {{.*}} "-target-cpu" "attiny13a" 17 18 // RUN: %clang -### --target=avr -mmcu=attiny88 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK4 %s 19 // CHECK4: "-cc1" {{.*}} "-target-cpu" "attiny88" 20 // CHECK4: "-cc1as" {{.*}} "-target-cpu" "attiny88" 21 22 // RUN: %clang -### --target=avr -mmcu=attiny88 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK5 %s 23 // CHECK5: "-cc1" {{.*}} "-target-cpu" "attiny88" 24 // CHECK5: "-cc1as" {{.*}} "-target-cpu" "attiny88" 25 26 // RUN: %clang -### --target=avr -mmcu=atmega8u2 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK6 %s 27 // CHECK6: "-cc1" {{.*}} "-target-cpu" "atmega8u2" 28 // CHECK6: "-cc1as" {{.*}} "-target-cpu" "atmega8u2" 29 30 // RUN: %clang -### --target=avr -mmcu=atmega8u2 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK7 %s 31 // CHECK7: "-cc1" {{.*}} "-target-cpu" "atmega8u2" 32 // CHECK7: "-cc1as" {{.*}} "-target-cpu" "atmega8u2" 33 34 // RUN: %clang -### --target=avr -mmcu=atmega8a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK8 %s 35 // CHECK8: "-cc1" {{.*}} "-target-cpu" "atmega8a" 36 // CHECK8: "-cc1as" {{.*}} "-target-cpu" "atmega8a" 37 38 // RUN: %clang -### --target=avr -mmcu=atmega8a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECK9 %s 39 // CHECK9: "-cc1" {{.*}} "-target-cpu" "atmega8a" 40 // CHECK9: "-cc1as" {{.*}} "-target-cpu" "atmega8a" 41 42 // RUN: %clang -### --target=avr -mmcu=atmega16a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKa %s 43 // CHECKa: "-cc1" {{.*}} "-target-cpu" "atmega16a" 44 // CHECKa: "-cc1as" {{.*}} "-target-cpu" "atmega16a" 45 46 // RUN: %clang -### --target=avr -mmcu=atmega16a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKb %s 47 // CHECKb: "-cc1" {{.*}} "-target-cpu" "atmega16a" 48 // CHECKb: "-cc1as" {{.*}} "-target-cpu" "atmega16a" 49 50 // RUN: %clang -### --target=avr -mmcu=atmega128a -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKc %s 51 // CHECKc: "-cc1" {{.*}} "-target-cpu" "atmega128a" 52 // CHECKc: "-cc1as" {{.*}} "-target-cpu" "atmega128a" 53 54 // RUN: %clang -### --target=avr -mmcu=atmega2560 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKd %s 55 // CHECKd: "-cc1" {{.*}} "-target-cpu" "atmega2560" 56 // CHECKd: "-cc1as" {{.*}} "-target-cpu" "atmega2560" 57 58 // RUN: %clang -### --target=avr -mmcu=attiny10 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKe %s 59 // CHECKe: "-cc1" {{.*}} "-target-cpu" "attiny10" 60 // CHECKe: "-cc1as" {{.*}} "-target-cpu" "attiny10" 61 62 // RUN: %clang -### --target=avr -mmcu=atxmega16a4 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKf %s 63 // CHECKf: "-cc1" {{.*}} "-target-cpu" "atxmega16a4" 64 // CHECKf: "-cc1as" {{.*}} "-target-cpu" "atxmega16a4" 65 66 // RUN: %clang -### --target=avr -mmcu=atxmega64b1 -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKg %s 67 // CHECKg: "-cc1" {{.*}} "-target-cpu" "atxmega64b1" 68 // CHECKg: "-cc1as" {{.*}} "-target-cpu" "atxmega64b1" 69 70 // RUN: %clang -### --target=avr -mmcu=atxmega64a1u -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKh %s 71 // CHECKh: "-cc1" {{.*}} "-target-cpu" "atxmega64a1u" 72 // CHECKh: "-cc1as" {{.*}} "-target-cpu" "atxmega64a1u" 73 74 // RUN: %clang -### --target=avr -mmcu=atxmega128a3u -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKj %s 75 // CHECKj: "-cc1" {{.*}} "-target-cpu" "atxmega128a3u" 76 // CHECKj: "-cc1as" {{.*}} "-target-cpu" "atxmega128a3u" 77 78 // RUN: %clang -### --target=avr -mmcu=atxmega128a4u -save-temps %s 2>&1 | FileCheck -check-prefix=CHECKi %s 79 // CHECKi: "-cc1" {{.*}} "-target-cpu" "atxmega128a4u" 80 // CHECKi: "-cc1as" {{.*}} "-target-cpu" "atxmega128a4u" 81