1 /// Simple tests for valid input.
3 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
4 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=never %s 2>&1 | FileCheck %s --check-prefix=NEVER
5 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=arm %s 2>&1 | FileCheck %s --check-prefix=ARM
6 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=thumb %s 2>&1 | FileCheck %s --check-prefix=THUMB
7 /// -Xassembler
-mimplicit-it
=
8 // RUN
: %clang
-target arm-linux-gnueabi
-### -Xassembler -mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
9 // RUN
: %clang
-target arm-linux-gnueabi
-### -Xassembler -mimplicit-it=never %s 2>&1 | FileCheck %s --check-prefix=NEVER
10 // RUN
: %clang
-target arm-linux-gnueabi
-### -Xassembler -mimplicit-it=arm %s 2>&1 | FileCheck %s --check-prefix=ARM
11 // RUN
: %clang
-target arm-linux-gnueabi
-### -Xassembler -mimplicit-it=thumb %s 2>&1 | FileCheck %s --check-prefix=THUMB
12 /// Test space separated
-Wa
,- arguments
(latter wins
).
13 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
14 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=never -Wa,-mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
15 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=never %s 2>&1 | FileCheck %s --check-prefix=NEVER
16 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=arm %s 2>&1 | FileCheck %s --check-prefix=ARM
17 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=thumb %s 2>&1 | FileCheck %s --check-prefix=THUMB
18 /// Test comma separated
-Wa
,- arguments
(latter wins
).
19 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=always,-mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
20 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=never,-mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
21 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=always,-mimplicit-it=never %s 2>&1 | FileCheck %s --check-prefix=NEVER
22 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=always,-mimplicit-it=arm %s 2>&1 | FileCheck %s --check-prefix=ARM
23 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=always,-mimplicit-it=thumb %s 2>&1 | FileCheck %s --check-prefix=THUMB
25 /// Mix
-implicit-it
= (compiler
) with
-Wa
,-mimplicit-it
= (assembler
), the
26 /// last one set takes priority.
27 // RUN
: %clang
-target arm-linux-gnueabi
-### -mimplicit-it=always -Wa,-mimplicit-it=always %S/Inputs/wildcard1.c 2>&1 | FileCheck %s --check-prefix=ALWAYS
28 // RUN
: %clang
-target arm-linux-gnueabi
-### -mimplicit-it=never -Wa,-mimplicit-it=always %S/Inputs/wildcard1.c 2>&1 | FileCheck %s --check-prefix=ALWAYS
29 // RUN
: %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=never -mimplicit-it=always %S/Inputs/wildcard1.c 2>&1 | FileCheck %s --check-prefix=ALWAYS
31 /// Test invalid input.
32 // RUN
: not %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID
33 // RUN
: not %clang
-target arm-linux-gnueabi
-### -Xassembler -mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID
34 // RUN
: not %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID
35 // RUN
: not %clang
-target arm-linux-gnueabi
-### -Wa,-mimplicit-it=always,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID
38 /// Check that the argument we ignore is still marked as used.
39 // ALWAYS-
NOT: warning
: argument unused during compilation
: {{.*}}-mimplicit-it={{.*}}
40 /// Check that there isn
't a second -arm-implicit-it before or after the one
41 /// that was the indended match.
42 // ALWAYS-NOT: "-arm-implicit-it={{.*}}"
43 // ALWAYS: "-mllvm" "-arm-implicit-it=always"
44 // ALWAYS-NOT: "-arm-implicit-it={{.*}}"
45 // NEVER-NOT: "-arm-implicit-it={{.*}}"
46 // NEVER: "-mllvm" "-arm-implicit-it=never"
47 // NEVER-NOT: "-arm-implicit-it={{.*}}"
48 // ARM: "-mllvm" "-arm-implicit-it=arm"
49 // THUMB: "-mllvm" "-arm-implicit-it=thumb"
50 // INVALID: error: unsupported argument 'foo
' to option '-Wa
,-mimplicit-it
='