mirror of
https://github.com/ziglang/zig.git
synced 2026-02-11 20:11:23 +00:00
spirv: lower enum_tag constants
This commit is contained in:
parent
aeaaa953a0
commit
cc13864dfb
@ -1146,6 +1146,11 @@ pub const DeclGen = struct {
|
||||
});
|
||||
return result_id;
|
||||
},
|
||||
.enum_tag => {
|
||||
const int_val = try val.intFromEnum(ty, mod);
|
||||
const int_ty = ty.intTagType(mod);
|
||||
return try self.constant(int_ty, int_val, repr);
|
||||
},
|
||||
// TODO: We can handle most pointers here (decl refs etc), because now they emit an extra
|
||||
// OpVariable that is not really required.
|
||||
else => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user