https://github.com/aobolensk created 
https://github.com/llvm/llvm-project/pull/216095

Discussed in 
https://github.com/llvm/llvm-project/pull/210882#discussion_r3768116465 

>From 15b704e8a988e2c57f690c5a81cbd2772fbf1d72 Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <[email protected]>
Date: Thu, 13 Aug 2026 17:57:04 +0200
Subject: [PATCH] [NFC][clang][DebugInfo] Add SPIR-V calling convention test
 coverage

---
 clang/test/DebugInfo/Generic/cc.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/clang/test/DebugInfo/Generic/cc.c 
b/clang/test/DebugInfo/Generic/cc.c
index e430e4c8ed87b..170bcca5a4215 100644
--- a/clang/test/DebugInfo/Generic/cc.c
+++ b/clang/test/DebugInfo/Generic/cc.c
@@ -4,6 +4,7 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-windows-cygnus -o - -emit-llvm 
-debug-info-kind=limited %s | FileCheck %s --check-prefix=WINDOWS
 // RUN: %clang_cc1 -triple i386-pc-linux-gnu -o - -emit-llvm 
-debug-info-kind=limited %s | FileCheck %s --check-prefix=LINUX32
 // RUN: %clang_cc1 -triple armv7--linux-gnueabihf -o - -emit-llvm 
-debug-info-kind=limited %s | FileCheck %s --check-prefix=ARM
+// RUN: %clang_cc1 -triple spirv64-unknown-unknown -o - -emit-llvm 
-debug-info-kind=limited %s | FileCheck %s --check-prefix=SPIRV
 
 //  enum CallingConv {
 //    CC_C,           // __attribute__((cdecl))
@@ -134,3 +135,11 @@ __attribute__((pcs("aapcs-vfp"))) int add_aapcs_vfp(int a, 
int b) {
   return a+b;
 }
 #endif
+
+#ifdef __SPIRV__
+// SPIRV: !DISubprogram({{.*}}"add_spir", {{.*}}type: ![[FTY:[0-9]+]]
+// SPIRV: ![[FTY]] = !DISubroutineType({{.*}}cc: DW_CC_LLVM_SpirFunction,
+int add_spir(int a, int b) {
+  return a+b;
+}
+#endif

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to