Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions clang/test/Analysis/undef-call.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: rm -rf %T/ctudir
// RUN: mkdir %T/ctudir
// RUN: %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config ctu-dir=%T/ctudir -verify %s
// RUN: rm -rf %t.dir/ctudir
// RUN: mkdir -p %t.dir/ctudir
// RUN: %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config ctu-dir=%t.dir/ctudir -verify %s
// expected-no-diagnostics

struct S {
Expand Down
12 changes: 6 additions & 6 deletions clang/test/CodeGen/thinlto_backend.ll
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
; Ensure f2 was imported. Check for all 3 flavors of -save-temps[=cwd|obj].
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc -save-temps=obj
; RUN: llvm-dis %t1.s.3.import.bc -o - | FileCheck --check-prefix=CHECK-IMPORT %s
; RUN: mkdir -p %T/dir1
; RUN: cd %T/dir1
; RUN: mkdir -p %t.dir/dir1
; RUN: cd %t.dir/dir1
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc -save-temps=cwd
; RUN: cd ../..
; RUN: llvm-dis %T/dir1/*1.s.3.import.bc -o - | FileCheck --check-prefix=CHECK-IMPORT %s
; RUN: mkdir -p %T/dir2
; RUN: cd %T/dir2
; RUN: llvm-dis %t.dir/dir1/*1.s.3.import.bc -o - | FileCheck --check-prefix=CHECK-IMPORT %s
; RUN: mkdir -p %t.dir/dir2
; RUN: cd %t.dir/dir2
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc -save-temps
; RUN: cd ../..
; RUN: llvm-dis %T/dir2/*1.s.3.import.bc -o - | FileCheck --check-prefix=CHECK-IMPORT %s
; RUN: llvm-dis %t.dir/dir2/*1.s.3.import.bc -o - | FileCheck --check-prefix=CHECK-IMPORT %s
; CHECK-IMPORT: define available_externally void @f2()
; RUN: llvm-nm %t3.o | FileCheck --check-prefix=CHECK-OBJ %s
; CHECK-OBJ: T f1
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGenCXX/module-intializer-pmf.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %s \
// RUN: -emit-module-interface -o %T/HasPMF.pcm
// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %T/HasPMF.pcm \
// RUN: -emit-module-interface -o %t.HasPMF.pcm
// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t.HasPMF.pcm \
// RUN: -emit-llvm -o - | FileCheck %s

module;
Expand Down
8 changes: 4 additions & 4 deletions clang/test/CodeGenCXX/profile-remap.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// REQUIRES: x86-registered-target
//
// RUN: %clang_cc1 -triple x86_64-linux-gnu -fprofile-sample-use=%S/Inputs/profile-remap.samples -fprofile-remapping-file=%S/Inputs/profile-remap.map -O2 %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SAMPLES
// RUN: llvm-profdata merge -output %T.profdata %S/Inputs/profile-remap.proftext
// RUN: %clang_cc1 -triple x86_64-linux-gnu -fprofile-instrument-use-path=%T.profdata -fprofile-remapping-file=%S/Inputs/profile-remap.map -O2 %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CHECK-INSTR
// RUN: llvm-profdata merge -output %T.profdata %S/Inputs/profile-remap_entry.proftext
// RUN: %clang_cc1 -triple x86_64-linux-gnu -fprofile-instrument-use-path=%T.profdata -fprofile-remapping-file=%S/Inputs/profile-remap.map -O2 %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CHECK-INSTR
// RUN: llvm-profdata merge -output %t.profdata %S/Inputs/profile-remap.proftext
// RUN: %clang_cc1 -triple x86_64-linux-gnu -fprofile-instrument-use-path=%t.profdata -fprofile-remapping-file=%S/Inputs/profile-remap.map -O2 %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CHECK-INSTR
// RUN: llvm-profdata merge -output %t.profdata %S/Inputs/profile-remap_entry.proftext
// RUN: %clang_cc1 -triple x86_64-linux-gnu -fprofile-instrument-use-path=%t.profdata -fprofile-remapping-file=%S/Inputs/profile-remap.map -O2 %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CHECK-INSTR

namespace Foo {
struct X {};
Expand Down
7 changes: 4 additions & 3 deletions clang/test/Driver/HLSL/metal-converter.hlsl
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// RUN: echo "dxv" > %T/dxv && chmod 754 %T/dxv
// RUN: mkdir -p %t.dir
// RUN: echo "dxv" > %t.dir/dxv && chmod 754 %t.dir/dxv

// RUN: env PATH="" %clang_dxc -T cs_6_0 %s -metal -Fo %t.mtl -### 2>&1 | FileCheck --check-prefix=NO_DXV %s
// RUN: env PATH="" %clang_dxc -T cs_6_0 %s -metal -Vd -Fo %t.mtl -### 2>&1 | FileCheck --check-prefix=NO_DXV %s
// RUN: env PATH="" %clang_dxc -T cs_6_0 %s --dxv-path=%T -metal -Vd -Fo %t.mtl -### 2>&1 | FileCheck --check-prefix=NO_DXV %s
// RUN: env PATH="" %clang_dxc -T cs_6_0 %s --dxv-path=%t.dir -metal -Vd -Fo %t.mtl -### 2>&1 | FileCheck --check-prefix=NO_DXV %s
// NO_DXV: "{{.*}}metal-shaderconverter{{(.exe)?}}" "{{.*}}.obj" "-o" "{{.*}}.mtl"

// RUN: %clang_dxc -T cs_6_0 %s -metal -### 2>&1 | FileCheck --check-prefix=NO_MTL %s
// NO_MTL-NOT: metal-shaderconverter

// RUN: %clang_dxc -T cs_6_0 %s --dxv-path=%T -metal -Fo %t.mtl -### 2>&1 | FileCheck --check-prefix=DXV %s
// RUN: %clang_dxc -T cs_6_0 %s --dxv-path=%t.dir -metal -Fo %t.mtl -### 2>&1 | FileCheck --check-prefix=DXV %s
// DXV: "{{.*}}dxv{{(.exe)?}}" "{{.*}}.obj" "-o" "{{.*}}.dxo"
// DXV: "{{.*}}metal-shaderconverter{{(.exe)?}}" "{{.*}}.dxo" "-o" "{{.*}}.mtl"

Expand Down
10 changes: 5 additions & 5 deletions clang/test/Driver/baremetal-sysroot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
// Test that when a --sysroot is not provided, driver picks the default
// location correctly if available.

// RUN: rm -rf %T/baremetal_default_sysroot
// RUN: mkdir -p %T/baremetal_default_sysroot/bin
// RUN: mkdir -p %T/baremetal_default_sysroot/lib/clang-runtimes/armv6m-none-eabi
// RUN: ln -s %clang %T/baremetal_default_sysroot/bin/clang
// RUN: rm -rf %t.dir/baremetal_default_sysroot
// RUN: mkdir -p %t.dir/baremetal_default_sysroot/bin
// RUN: mkdir -p %t.dir/baremetal_default_sysroot/lib/clang-runtimes/armv6m-none-eabi
// RUN: ln -s %clang %t.dir/baremetal_default_sysroot/bin/clang

// RUN: %T/baremetal_default_sysroot/bin/clang -no-canonical-prefixes %s -### -o %t.out 2>&1 \
// RUN: %t.dir/baremetal_default_sysroot/bin/clang -no-canonical-prefixes %s -### -o %t.out 2>&1 \
// RUN: -target armv6m-none-eabi --sysroot= \
// RUN: | FileCheck --check-prefix=CHECK-V6M-C %s
// CHECK-V6M-C: "{{.*}}clang{{.*}}" "-cc1" "-triple" "thumbv6m-unknown-none-eabi"
Expand Down
22 changes: 11 additions & 11 deletions clang/test/Driver/baremetal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@
// CHECK-V6M-NDL: "-Bstatic" "-m" "armelf" "-EL"
// CHECK-V6M-NDL-SAME: "-L{{[^"]*}}{{[/\\]+}}Inputs{{[/\\]+}}baremetal_arm{{[/\\]+}}lib"

// RUN: rm -rf %T/baremetal_cxx_sysroot
// RUN: mkdir -p %T/baremetal_cxx_sysroot/usr/include/c++/v1
// RUN: rm -rf %t.dir/baremetal_cxx_sysroot
// RUN: mkdir -p %t.dir/baremetal_cxx_sysroot/usr/include/c++/v1
// RUN: %clangxx %s -### 2>&1 \
// RUN: --target=armv6m-none-eabi \
// RUN: --sysroot=%T/baremetal_cxx_sysroot \
// RUN: --sysroot=%t.dir/baremetal_cxx_sysroot \
// RUN: -stdlib=libc++ \
// RUN: | FileCheck --check-prefix=CHECK-V6M-LIBCXX-USR %s
// CHECK-V6M-LIBCXX-USR: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
Expand Down Expand Up @@ -568,24 +568,24 @@

// Check that compiler-rt library without the arch filename suffix will
// be used if present.
// RUN: rm -rf %T/baremetal_clang_rt_noarch
// RUN: mkdir -p %T/baremetal_clang_rt_noarch/lib
// RUN: touch %T/baremetal_clang_rt_noarch/lib/libclang_rt.builtins.a
// RUN: rm -rf %t.dir/baremetal_clang_rt_noarch
// RUN: mkdir -p %t.dir/baremetal_clang_rt_noarch/lib
// RUN: touch %t.dir/baremetal_clang_rt_noarch/lib/libclang_rt.builtins.a
// RUN: %clang %s -### 2>&1 \
// RUN: --target=armv6m-none-eabi \
// RUN: --sysroot=%T/baremetal_clang_rt_noarch \
// RUN: --sysroot=%t.dir/baremetal_clang_rt_noarch \
// RUN: | FileCheck --check-prefix=CHECK-CLANGRT-NOARCH %s
// CHECK-CLANGRT-NOARCH: "{{[^"]*}}libclang_rt.builtins.a"
// CHECK-CLANGRT-NOARCH-NOT: "{{[^"]*}}libclang_rt.builtins.a"

// Check that compiler-rt library with the arch filename suffix will be
// used if present.
// RUN: rm -rf %T/baremetal_clang_rt_arch
// RUN: mkdir -p %T/baremetal_clang_rt_arch/lib
// RUN: touch %T/baremetal_clang_rt_arch/lib/libclang_rt.builtins-armv6m.a
// RUN: rm -rf %t.dir/baremetal_clang_rt_arch
// RUN: mkdir -p %t.dir/baremetal_clang_rt_arch/lib
// RUN: touch %t.dir/baremetal_clang_rt_arch/lib/libclang_rt.builtins-armv6m.a
// RUN: %clang %s -### 2>&1 \
// RUN: --target=armv6m-none-eabi \
// RUN: --sysroot=%T/baremetal_clang_rt_arch \
// RUN: --sysroot=%t.dir/baremetal_clang_rt_arch \
// RUN: | FileCheck --check-prefix=CHECK-CLANGRT-ARCH %s
// CHECK-CLANGRT-ARCH: "{{[^"]*}}libclang_rt.builtins.a"
// CHECK-CLANGRT-ARCH-NOT: "{{[^"]*}}libclang_rt.builtins.a"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// RUN: %clangxx -S -ftime-trace -ftime-trace-granularity=0 -o %T/check-time-trace-ParseDeclarationOrFunctionDefinition %s
// RUN: cat %T/check-time-trace-ParseDeclarationOrFunctionDefinition.json \
// RUN: mkdir -p %t.dir
// RUN: %clangxx -S -ftime-trace -ftime-trace-granularity=0 -o %t.dir/check-time-trace-ParseDeclarationOrFunctionDefinition %s
// RUN: cat %t.dir/check-time-trace-ParseDeclarationOrFunctionDefinition.json \
// RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
// RUN: | FileCheck %s

// CHECK-DAG: "name": "ParseDeclarationOrFunctionDefinition"
// CHECK-DAG: "detail": "{{.*}}check-time-trace-ParseDeclarationOrFunctionDefinition.cpp:15:1"
// CHECK-DAG: "detail": "{{.*}}check-time-trace-ParseDeclarationOrFunctionDefinition.cpp:16:1"
// CHECK-DAG: "name": "ParseFunctionDefinition"
// CHECK-DAG: "detail": "foo"
// CHECK-DAG: "name": "ParseFunctionDefinition"
Expand Down
9 changes: 5 additions & 4 deletions clang/test/Driver/cl-showfilenames.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
// There is currently a discussion of this going on at:
// https://reviews.llvm.org/D69825

// RUN: %clang_cl -fno-integrated-cc1 --target=i686-pc-win32 /c /Fo%T/ /showFilenames -- %s 2>&1 | FileCheck -check-prefix=show %s
// RUN: %clang_cl -fno-integrated-cc1 --target=i686-pc-win32 /c /Fo%T/ /showFilenames -- %s %S/Inputs/wildcard*.c 2>&1 | FileCheck -check-prefix=multiple %s
// RUN: mkdir -p %t.dir
// RUN: %clang_cl -fno-integrated-cc1 --target=i686-pc-win32 /c /Fo%t.dir/ /showFilenames -- %s 2>&1 | FileCheck -check-prefix=show %s
// RUN: %clang_cl -fno-integrated-cc1 --target=i686-pc-win32 /c /Fo%t.dir/ /showFilenames -- %s %S/Inputs/wildcard*.c 2>&1 | FileCheck -check-prefix=multiple %s

// RUN: %clang_cl -fno-integrated-cc1 --target=i686-pc-win32 /c /Fo%T/ -- %s 2>&1 | FileCheck -check-prefix=noshow %s
// RUN: %clang_cl -fno-integrated-cc1 --target=i686-pc-win32 /c /Fo%T/ /showFilenames /showFilenames- -- %s 2>&1 | FileCheck -check-prefix=noshow %s
// RUN: %clang_cl -fno-integrated-cc1 --target=i686-pc-win32 /c /Fo%t.dir/ -- %s 2>&1 | FileCheck -check-prefix=noshow %s
// RUN: %clang_cl -fno-integrated-cc1 --target=i686-pc-win32 /c /Fo%t.dir/ /showFilenames /showFilenames- -- %s 2>&1 | FileCheck -check-prefix=noshow %s


#pragma message "Hello"
Expand Down
21 changes: 11 additions & 10 deletions clang/test/Driver/clang-offload-bundler.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,15 +413,16 @@
// bundle and archives them. Therefore for each target, the output is an
// archive of unbundled bitcodes.
//
// RUN: mkdir -p %t.dir
// RUN: clang-offload-bundler -type=bc -targets=hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx906 \
// RUN: -input=%t.tgt1 -input=%t.tgt2 -output=%T/hip_bundle1.bc
// RUN: -input=%t.tgt1 -input=%t.tgt2 -output=%t.dir/hip_bundle1.bc
// RUN: clang-offload-bundler -type=bc -targets=hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx906 \
// RUN: -input=%t.tgt1 -input=%t.tgt2 -output=%T/hip_bundle2.bc
// RUN: llvm-ar cr %T/hip_archive.a %T/hip_bundle1.bc %T/hip_bundle2.bc
// RUN: -input=%t.tgt1 -input=%t.tgt2 -output=%t.dir/hip_bundle2.bc
// RUN: llvm-ar cr %t.dir/hip_archive.a %t.dir/hip_bundle1.bc %t.dir/hip_bundle2.bc
// RUN: clang-offload-bundler -unbundle -type=a -targets=hip-amdgcn-amd-amdhsa--gfx900,hip-amdgcn-amd-amdhsa--gfx906 \
// RUN: -output=%T/hip_900.a -output=%T/hip_906.a -input=%T/hip_archive.a
// RUN: llvm-ar t %T/hip_900.a | FileCheck -check-prefix=HIP-AR-900 %s
// RUN: llvm-ar t %T/hip_906.a | FileCheck -check-prefix=HIP-AR-906 %s
// RUN: -output=%t.dir/hip_900.a -output=%t.dir/hip_906.a -input=%t.dir/hip_archive.a
// RUN: llvm-ar t %t.dir/hip_900.a | FileCheck -check-prefix=HIP-AR-900 %s
// RUN: llvm-ar t %t.dir/hip_906.a | FileCheck -check-prefix=HIP-AR-906 %s
// HIP-AR-900-DAG: hip_bundle1-hip-amdgcn-amd-amdhsa--gfx900
// HIP-AR-900-DAG: hip_bundle2-hip-amdgcn-amd-amdhsa--gfx900
// HIP-AR-906-DAG: hip_bundle1-hip-amdgcn-amd-amdhsa--gfx906
Expand Down Expand Up @@ -553,14 +554,14 @@

// Check compatibility of HIP code objects found in the heterogeneous archive library with OpenMP code objects of the target
// RUN: clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa--gfx906 \
// RUN: -output=%T/hip-openmp_906.a -input=%T/hip_archive.a -hip-openmp-compatible
// RUN: llvm-ar t %T/hip-openmp_906.a | FileCheck -check-prefix=OPENMPHIPCOMPAT %s
// RUN: -output=%t.dir/hip-openmp_906.a -input=%t.dir/hip_archive.a -hip-openmp-compatible
// RUN: llvm-ar t %t.dir/hip-openmp_906.a | FileCheck -check-prefix=OPENMPHIPCOMPAT %s
// OPENMPHIPCOMPAT: hip_bundle1-hip-amdgcn-amd-amdhsa--gfx906

// Check if a malformat bundle id can be detected and an error can be emitted.
// RUN: not clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa -output=%T/hip-openmp_906.a -input=%T/hip_archive.a -hip-openmp-compatible 2>&1 | FileCheck %s -check-prefix=ERROR-WRONG-FORMAT
// RUN: not clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa -output=%t.dir/hip-openmp_906.a -input=%t.dir/hip_archive.a -hip-openmp-compatible 2>&1 | FileCheck %s -check-prefix=ERROR-WRONG-FORMAT
// ERROR-WRONG-FORMAT: error: Targets need to follow the format '<offload kind>-<target triple>', where '<target triple>' follows the format '<kind>-<arch>-<vendor>-<os>-<env>[-<target id>[:target features]]'.
// RUN: not clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa-gfx906 -output=%T/hip-openmp_906.a -input=%T/hip_archive.a -hip-openmp-compatible 2>&1 | FileCheck %s -check-prefix=ERROR-NO-ENV
// RUN: not clang-offload-bundler -unbundle -type=a -targets=openmp-amdgcn-amd-amdhsa-gfx906 -output=%t.dir/hip-openmp_906.a -input=%t.dir/hip_archive.a -hip-openmp-compatible 2>&1 | FileCheck %s -check-prefix=ERROR-NO-ENV
// ERROR-NO-ENV: error: no compatible code object found for the target 'openmp-amdgcn-amd-amdhsa--'

// Some code so that we can create a binary out of this file.
Expand Down
11 changes: 6 additions & 5 deletions clang/test/Driver/clang-sycl-linker-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a_0.spv
//
// Test the dry run of a simple case with device library files specified.
// RUN: touch %T/lib1.bc
// RUN: touch %T/lib2.bc
// RUN: clang-sycl-linker --dry-run -v -triple=spirv64 %t_1.bc %t_2.bc --library-path=%T --device-libs=lib1.bc,lib2.bc -o a.spv 2>&1 \
// RUN: mkdir -p %t.dir
// RUN: touch %t.dir/lib1.bc
// RUN: touch %t.dir/lib2.bc
// RUN: clang-sycl-linker --dry-run -v -triple=spirv64 %t_1.bc %t_2.bc --library-path=%t.dir --device-libs=lib1.bc,lib2.bc -o a.spv 2>&1 \
// RUN: | FileCheck %s --check-prefix=DEVLIBS
// DEVLIBS: sycl-device-link: inputs: {{.*}}.bc libfiles: {{.*}}lib1.bc, {{.*}}lib2.bc output: [[LLVMLINKOUT:.*]].bc
// DEVLIBS-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a_0.spv
Expand All @@ -25,10 +26,10 @@
// FILETYPEERROR: Unsupported file type
//
// Test to see if device library related errors are emitted.
// RUN: not clang-sycl-linker --dry-run -triple=spirv64 %t_1.bc %t_2.bc --library-path=%T --device-libs= -o a.spv 2>&1 \
// RUN: not clang-sycl-linker --dry-run -triple=spirv64 %t_1.bc %t_2.bc --library-path=%t.dir --device-libs= -o a.spv 2>&1 \
// RUN: | FileCheck %s --check-prefix=DEVLIBSERR1
// DEVLIBSERR1: Number of device library files cannot be zero
// RUN: not clang-sycl-linker --dry-run -triple=spirv64 %t_1.bc %t_2.bc --library-path=%T --device-libs=lib1.bc,lib2.bc,lib3.bc -o a.spv 2>&1 \
// RUN: not clang-sycl-linker --dry-run -triple=spirv64 %t_1.bc %t_2.bc --library-path=%t.dir --device-libs=lib1.bc,lib2.bc,lib3.bc -o a.spv 2>&1 \
// RUN: | FileCheck %s --check-prefix=DEVLIBSERR2
// DEVLIBSERR2: '{{.*}}lib3.bc' SYCL device library file is not found
//
Expand Down
9 changes: 5 additions & 4 deletions clang/test/Driver/dxc_dxv_path.hlsl
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
// RUN: env PATH="" %clang_dxc -I test -Tlib_6_3 -Fo %T/a.dxo -### %s 2>&1 | FileCheck %s
// RUN: mkdir -p %t.dir
// RUN: env PATH="" %clang_dxc -I test -Tlib_6_3 -Fo %t.dir/a.dxo -### %s 2>&1 | FileCheck %s

// Make sure report warning.
// CHECK:dxv not found

// RUN: echo "dxv" > %T/dxv && chmod 754 %T/dxv && %clang_dxc --dxv-path=%T %s -Tlib_6_3 -Fo %T/a.dxo -### 2>&1 | FileCheck %s --check-prefix=DXV_PATH
// RUN: echo "dxv" > %t.dir/dxv && chmod 754 %t.dir/dxv && %clang_dxc --dxv-path=%t.dir %s -Tlib_6_3 -Fo %t.dir/a.dxo -### 2>&1 | FileCheck %s --check-prefix=DXV_PATH
// DXV_PATH:dxv{{(.exe)?}}" "{{.*}}.obj" "-o" "{{.*}}/a.dxo"

// RUN: %clang_dxc -I test -Vd -Tlib_6_3 -### %s 2>&1 | FileCheck %s --check-prefix=VD
// VD:"-cc1"{{.*}}"-triple" "dxilv1.3-unknown-shadermodel6.3-library"
// VD-NOT:dxv not found

// RUN: %clang_dxc -Tlib_6_3 -ccc-print-bindings --dxv-path=%T -Fo %t.dxo %s 2>&1 | FileCheck %s --check-prefix=BINDINGS
// RUN: %clang_dxc -Tlib_6_3 -ccc-print-bindings --dxv-path=%t.dir -Fo %t.dxo %s 2>&1 | FileCheck %s --check-prefix=BINDINGS
// BINDINGS: "dxilv1.3-unknown-shadermodel6.3-library" - "clang", inputs: ["[[INPUT:.+]]"], output: "[[obj:.+]].obj"
// BINDINGS-NEXT: "dxilv1.3-unknown-shadermodel6.3-library" - "hlsl::Validator", inputs: ["[[obj]].obj"], output: "{{.+}}.dxo"

// RUN: %clang_dxc -Tlib_6_3 -ccc-print-phases --dxv-path=%T -Fo %t.dxc %s 2>&1 | FileCheck %s --check-prefix=PHASES
// RUN: %clang_dxc -Tlib_6_3 -ccc-print-phases --dxv-path=%t.dir -Fo %t.dxc %s 2>&1 | FileCheck %s --check-prefix=PHASES

// PHASES: 0: input, "[[INPUT:.+]]", hlsl
// PHASES-NEXT: 1: preprocessor, {0}, c++-cpp-output
Expand Down
Loading