aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen/spirv.zig')
-rw-r--r--src/codegen/spirv.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig
index d7ab7ed4e0..6e95db9a68 100644
--- a/src/codegen/spirv.zig
+++ b/src/codegen/spirv.zig
@@ -369,6 +369,17 @@ pub const DeclGen = struct {
.composite_integer,
};
},
+ .Enum => blk: {
+ var buffer: Type.Payload.Bits = undefined;
+ const int_ty = ty.intTagType(&buffer);
+ const int_info = int_ty.intInfo(target);
+ break :blk ArithmeticTypeInfo{
+ .bits = int_info.bits,
+ .is_vector = false,
+ .signedness = int_info.signedness,
+ .class = .integer,
+ };
+ },
// As of yet, there is no vector support in the self-hosted compiler.
.Vector => self.todo("implement arithmeticTypeInfo for Vector", .{}),
// TODO: For which types is this the case?