Skip to content

Commit c391082

Browse files
authored
[clang][Driver][SPIR-V] Make tool names consistent (#122343)
Some use `SPIRV` and some use `SPIR-V`, just use `SPIR-V` which is what we use normally. I noticed this when fixing the test in #122310. Signed-off-by: Sarnie, Nick <[email protected]>
1 parent 44058e5 commit c391082

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

clang/lib/Driver/ToolChains/SPIRV.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class LLVM_LIBRARY_VISIBILITY Translator : public Tool {
4343

4444
class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
4545
public:
46-
Linker(const ToolChain &TC) : Tool("SPIRV::Linker", "spirv-link", TC) {}
46+
Linker(const ToolChain &TC) : Tool("SPIR-V::Linker", "spirv-link", TC) {}
4747
bool hasIntegratedCPP() const override { return false; }
4848
bool isLinkJob() const override { return true; }
4949
void ConstructJob(Compilation &C, const JobAction &JA,
@@ -54,7 +54,7 @@ class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
5454

5555
class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
5656
public:
57-
Assembler(const ToolChain &TC) : Tool("SPIRV::Assembler", "spirv-as", TC) {}
57+
Assembler(const ToolChain &TC) : Tool("SPIR-V::Assembler", "spirv-as", TC) {}
5858
bool hasIntegratedAssembler() const override { return false; }
5959
bool hasIntegratedCPP() const override { return false; }
6060
void ConstructJob(Compilation &C, const JobAction &JA,

clang/test/Driver/spirv-openmp-toolchain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
// CHECK-BINDINGS-TEMPS: "spirv64-intel" - "clang", inputs: ["[[INPUT]]"], output: "[[DEVICE_PP:.+]]"
4646
// CHECK-BINDINGS-TEMPS: "spirv64-intel" - "clang", inputs: ["[[DEVICE_PP]]", "[[HOST_BC]]"], output: "[[DEVICE_TEMP_BC:.+]]"
4747
// CHECK-BINDINGS-TEMPS: "spirv64-intel" - "SPIR-V::Translator", inputs: ["[[DEVICE_TEMP_BC]]"], output: "[[DEVICE_ASM:.+]]"
48-
// CHECK-BINDINGS-TEMPS: "spirv64-intel" - "SPIRV::Assembler", inputs: ["[[DEVICE_ASM]]"], output: "[[DEVICE_SPV:.+]]"
48+
// CHECK-BINDINGS-TEMPS: "spirv64-intel" - "SPIR-V::Assembler", inputs: ["[[DEVICE_ASM]]"], output: "[[DEVICE_SPV:.+]]"
4949
// CHECK-BINDINGS-TEMPS: "x86_64-unknown-linux-gnu" - "Offload::Packager", inputs: ["[[DEVICE_SPV]]"], output: "[[DEVICE_IMAGE:.+]]"
5050
// CHECK-BINDINGS-TEMPS: "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[HOST_BC]]", "[[DEVICE_IMAGE]]"], output: "[[HOST_ASM:.+]]"
5151
// CHECK-BINDINGS-TEMPS: "x86_64-unknown-linux-gnu" - "clang::as", inputs: ["[[HOST_ASM]]"], output: "[[HOST_OBJ:.+]]"

clang/test/Driver/spirv-toolchain.cl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@
7070
// SPLINK: {{llvm-spirv.*"}} [[BC]] "-o" [[SPV2:".*o"]]
7171
// SPLINK: {{spirv-link.*"}} [[SPV1]] [[SPV2]] "-o" "a.out"
7272

73+
//-----------------------------------------------------------------------------
74+
// Check bindings when linking when multiple input files are passed.
75+
// RUN: %clang -### -target spirv64 -ccc-print-bindings %s %s 2>&1 | FileCheck --check-prefix=SPLINK-BINDINGS %s
76+
77+
// SPLINK-BINDINGS: "clang", inputs: [[[CL:".*cl"]]], output: [[BC1:".*bc"]]
78+
// SPLINK-BINDINGS: "SPIR-V::Translator", inputs: [[[BC1]]], output: [[OBJ1:".*o"]]
79+
// SPLINK-BINDINGS: "clang", inputs: [[[CL]]], output: [[BC2:".*bc"]]
80+
// SPLINK-BINDINGS: "SPIR-V::Translator", inputs: [[[BC2]]], output: [[OBJ2:".*o"]]
81+
// SPLINK-BINDINGS: "SPIR-V::Linker", inputs: [[[OBJ1]], [[OBJ2]]], output: "a.out"
82+
7383
//-----------------------------------------------------------------------------
7484
// Check external vs internal object emission.
7585
// RUN: %clang -### --target=spirv64 -fno-integrated-objemitter %s 2>&1 | FileCheck --check-prefix=XTOR %s

0 commit comments

Comments
 (0)