From df5577c28bf1cc26f8bcf21ed1201e31987ac009 Mon Sep 17 00:00:00 2001 From: Robin Voetter Date: Fri, 25 Nov 2022 23:58:21 +0100 Subject: [PATCH] spirv: allow more calling conventions This allows the Zig calling convention and makes way for a Kernel calling convention in the future. Any future checks on calling conventions should be placed in Sema.zig. --- src/codegen/spirv.zig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig index 5f27c14e9512d2ea21bc5c8ec2ac93f9b12f0700..3e2e202fc65787e00c1be96ab8b7ff56d5682af2 100644 --- a/src/codegen/spirv.zig +++ b/src/codegen/spirv.zig @@ -491,9 +491,7 @@ pub const DeclGen = struct { break :blk try self.spv.resolveType(SpvType.initPayload(&payload.base)); }, .Fn => blk: { - // We only support C-calling-convention functions for now, no varargs. - if (ty.fnCallingConvention() != .C) - return self.fail("Unsupported calling convention for SPIR-V", .{}); + // TODO: Put this somewhere in Sema.zig if (ty.fnIsVarArgs()) return self.fail("VarArgs functions are unsupported for SPIR-V", .{}); -- 2.54.0