1 // We support a CC1 option for disabling LLVM's passes.
2 // RUN: %clang -O2 -Xclang -disable-llvm-passes -### %s 2>&1 \
3 // RUN:     | FileCheck --check-prefix=DISABLED %s
4 // DISABLED: -cc1
5 // DISABLED-NOT: "-mllvm" "-disable-llvm-passes"
6 // DISABLED: "-disable-llvm-passes"
7 //
8 // We also support two alternative spellings for historical reasons.
9 // RUN: %clang -O2 -Xclang -disable-llvm-optzns -### %s 2>&1 \
10 // RUN:     | FileCheck --check-prefix=DISABLED-LEGACY %s
11 // RUN: %clang -O2 -mllvm -disable-llvm-optzns -### %s 2>&1 \
12 // RUN:     | FileCheck --check-prefix=DISABLED-LEGACY %s
13 // DISABLED-LEGACY: -cc1
14 // DISABLED-LEGACY-NOT: "-mllvm" "-disable-llvm-optzns"
15 // DISABLED-LEGACY: "-disable-llvm-optzns"
16 //
17 // The main flag shouldn't be specially handled when used with '-mllvm'.
18 // RUN: %clang -O2 -mllvm -disable-llvm-passes -### %s 2>&1 | FileCheck --check-prefix=MLLVM %s
19 // MLLVM: -cc1
20 // MLLVM-NOT: -disable-llvm-passes
21 // MLLVM: "-mllvm" "-disable-llvm-passes"
22 // MLLVM-NOT: -disable-llvm-passes
23