1 // With no output args, we emit assembly to stdout.
2 // RUN: %clang_dxc -T lib_6_7 -Vd %s -### 2>&1 | FileCheck %s --check-prefixes=CHECK-CC1,CHECK-CC1-STDOUT
3 // RUN: %clang_dxc -T lib_6_7 -Vd %s -ccc-print-phases 2>&1 | FileCheck %s --check-prefixes=CHECK-PHASES,CHECK-PHASES-ASM
5 // Same if we explicitly ask for assembly (-Fc) to stdout.
6 // RUN: %clang_dxc -T lib_6_7 -Vd %s -Fc - -### 2>&1 | FileCheck %s --check-prefixes=CHECK-CC1,CHECK-CC1-STDOUT
7 // RUN: %clang_dxc -T lib_6_7 -Vd %s -Fc - -ccc-print-phases 2>&1 | FileCheck %s --check-prefixes=CHECK-PHASES,CHECK-PHASES-ASM
9 // DXIL Assembly to a file.
10 // RUN: %clang_dxc -T lib_6_7 -Vd %s -Fc x.asm -### 2>&1 | FileCheck %s --check-prefixes=CHECK-CC1,CHECK-CC1-ASM
11 // RUN: %clang_dxc -T lib_6_7 -Vd %s -Fcx.asm -### 2>&1 | FileCheck %s --check-prefixes=CHECK-CC1,CHECK-CC1-ASM
12 // RUN: %clang_dxc -T lib_6_7 -Vd %s -Fc x.asm -ccc-print-phases 2>&1 | FileCheck %s --check-prefixes=CHECK-PHASES,CHECK-PHASES-ASM
14 // DXIL Object code to a file.
15 // RUN: %clang_dxc -T lib_6_7 -Vd %s -Fo x.obj -### 2>&1 | FileCheck %s --check-prefixes=CHECK-CC1,CHECK-CC1-OBJ
16 // RUN: %clang_dxc -T lib_6_7 -Vd %s -Fox.obj -### 2>&1 | FileCheck %s --check-prefixes=CHECK-CC1,CHECK-CC1-OBJ
17 // RUN: %clang_dxc -T lib_6_7 -Vd %s -Fo x.obj -ccc-print-phases 2>&1 | FileCheck %s --check-prefixes=CHECK-PHASES,CHECK-PHASES-OBJ
19 // If both -Fc and -Fo are provided, we generate both files.
20 // RUN: %clang_dxc -T lib_6_7 -Vd %s -Fc x.asm -Fo x.obj -### 2>&1 | FileCheck %s --check-prefixes=CHECK-CC1,CHECK-CC1-ASM,CHECK-CC1-BOTH
21 // RUN: %clang_dxc -T lib_6_7 -Vd %s -Fc x.asm -Fo x.obj -ccc-print-phases 2>&1 | FileCheck %s --check-prefixes=CHECK-PHASES,CHECK-PHASES-OBJ
23 // CHECK-PHASES: 0: input, {{.*}}, hlsl
24 // CHECK-PHASES: 1: preprocessor, {0}, c++-cpp-output
25 // CHECK-PHASES: 2: compiler, {1}, ir
26 // CHECK-PHASES: 3: backend, {2}, assembler
27 // CHECK-PHASES-ASM-NOT: 4: assembler, {3}, object
28 // CHECK-PHASES-OBJ: 4: assembler, {3}, object
31 // CHECK-CC1-STDOUT-SAME: "-o" "-"
33 // CHECK-CC1-ASM-SAME: "-S"
34 // CHECK-CC1-ASM-SAME: "-o" "x.asm"
36 // CHECK-CC1-OBJ-SAME: "-emit-obj"
37 // CHECK-CC1-OBJ-SAME: "-o" "x.obj"
39 // For the case where we specify both -Fc and -Fo, we emit the asm as part of
40 // cc1 and invoke cc1as for the object.
41 // CHECK-CC1-BOTH: "-cc1as"
42 // CHECK-CC1-BOTH-SAME: "-o" "x.obj"