Commit df5577c28b

Robin Voetter <robin@voetter.nl>
2022-11-25 23:58:21
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.
1 parent ba60d45
Changed files (1)
src
codegen
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", .{});