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
6 // RUN: %clang -O2 -Xclang=-disable-llvm-passes -### %s 2>&1 \
7 // RUN: | FileCheck --check-prefix=DISABLED %s
9 // DISABLED-NOT: "-mllvm" "-disable-llvm-passes"
10 // DISABLED: "-disable-llvm-passes"
12 // We also support two alternative spellings for historical reasons.
13 // RUN: %clang -O2 -Xclang -disable-llvm-optzns -### %s 2>&1 \
14 // RUN: | FileCheck --check-prefix=DISABLED-LEGACY %s
15 // RUN: %clang -O2 -mllvm -disable-llvm-optzns -### %s 2>&1 \
16 // RUN: | FileCheck --check-prefix=DISABLED-LEGACY %s
17 // DISABLED-LEGACY: -cc1
18 // DISABLED-LEGACY-NOT: "-mllvm" "-disable-llvm-optzns"
19 // DISABLED-LEGACY: "-disable-llvm-optzns"
21 // The main flag shouldn't be specially handled when used with '-mllvm'.
22 // RUN: %clang -O2 -mllvm -disable-llvm-passes -### %s 2>&1 | FileCheck --check-prefix=MLLVM %s
24 // MLLVM-NOT: -disable-llvm-passes
25 // MLLVM: "-mllvm" "-disable-llvm-passes"
26 // MLLVM-NOT: -disable-llvm-passes