================
@@ -1793,9 +1793,13 @@ llvm::DIType *CGDebugInfo::CreateType(const TypedefType 
*Ty,
                                 Flags, Annotations);
 }
 
-static unsigned getDwarfCC(CallingConv CC) {
+static unsigned getDwarfCC(CallingConv CC, const llvm::Triple &T) {
   switch (CC) {
   case CC_C:
+    // On SPIR/SPIR-V, CC_C is the target default calling convention and lowers
+    // to spir_func, so describe it that way.
+    if (T.isSPIROrSPIRV())
+      return llvm::dwarf::DW_CC_LLVM_SpirFunction;
----------------
schittir wrote:

A note: I don't see a test checking clang's emission of 
DW_CC_LLVM_SpirFunction, but perhaps it is not this PR's responsibility to add 
coverage for it. @tahonermann 

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

Reply via email to