[llvm] [SPIRV] Error in backend for vararg functions (PR #169111)

Nick Sarnie via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 24 07:46:08 PST 2025


================
@@ -970,8 +970,11 @@ SPIRVType *SPIRVGlobalRegistry::getOpTypeForwardPointer(
 }
 
 SPIRVType *SPIRVGlobalRegistry::getOpTypeFunction(
-    SPIRVType *RetType, const SmallVectorImpl<SPIRVType *> &ArgTypes,
+    const FunctionType *Ty, SPIRVType *RetType,
+    const SmallVectorImpl<SPIRVType *> &ArgTypes,
     MachineIRBuilder &MIRBuilder) {
+  if (Ty->isVarArg())
+    reportFatalUsageError("SPIR-V does not support variadic functions");
----------------
sarnex wrote:

Great idea, in my latest commit a much better error is thrown. Thanks!

https://github.com/llvm/llvm-project/pull/169111


More information about the llvm-commits mailing list