[llvm] [SPIRV] Error in backend for vararg functions (PR #169111)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 00:54:02 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");
----------------
jmmartinez wrote:
I'm wondering if we should use a richer error reporting API for this.
More precisely, raising a diagnostic through `LLVMContext::diagnose` of type `DiagnosticInfoUnsupported`. To raise the line info to the user if it is available.
https://github.com/llvm/llvm-project/pull/169111
More information about the llvm-commits
mailing list