1 // Don't attempt slash switches on msys bash. 2 // REQUIRES: shell-preserves-root 3 4 // Note: %s must be preceded by --, otherwise it may be interpreted as a 5 // command-line option, e.g. on Mac where %s is commonly under /Users. 6 7 // RUN: %clang_cl /fallback /Dfoo=bar /Ubaz /Ifoo /O0 /Ox /GR /GR- /LD /LDd \ 8 // RUN: /MD /MDd /MTd /MT /FImyheader.h -### -- %s 2>&1 | FileCheck %s 9 // CHECK: "-fdiagnostics-format" "msvc-fallback" 10 // CHECK: || 11 // CHECK: cl.exe 12 // CHECK: "/nologo" 13 // CHECK: "/c" 14 // CHECK: "/W0" 15 // CHECK: "-D" "foo=bar" 16 // CHECK: "-U" "baz" 17 // CHECK: "-I" "foo" 18 // CHECK: "/Ox" 19 // CHECK: "/GR-" 20 // CHECK: "/FImyheader.h" 21 // CHECK: "/LD" 22 // CHECK: "/LDd" 23 // CHECK: "/MT" 24 // CHECK: "/Tc" "{{.*cl-fallback.c}}" 25 // CHECK: "/Fo{{.*cl-fallback.*.obj}}" 26 27 // RUN: %clang_cl /fallback /Od -### -- %s 2>&1 | FileCheck -check-prefix=O0 %s 28 // O0: cl.exe 29 // O0: "/Od" 30 // RUN: %clang_cl /fallback /O1 -### -- %s 2>&1 | FileCheck -check-prefix=O1 %s 31 // O1: cl.exe 32 // O1: "-O1" 33 // RUN: %clang_cl /fallback /O2 -### -- %s 2>&1 | FileCheck -check-prefix=O2 %s 34 // O2: cl.exe 35 // O2: "-O2" 36 // RUN: %clang_cl /fallback /Os -### -- %s 2>&1 | FileCheck -check-prefix=Os %s 37 // Os: cl.exe 38 // Os: "-Os" 39 // RUN: %clang_cl /fallback /Ox -### -- %s 2>&1 | FileCheck -check-prefix=Ox %s 40 // Ox: cl.exe 41 // Ox: "/Ox" 42