| ... | @@ -1146,6 +1146,11 @@ pub const DeclGen = struct { | ... | @@ -1146,6 +1146,11 @@ pub const DeclGen = struct { |
| 1146 | }); | 1146 | }); |
| 1147 | return result_id; | 1147 | return result_id; |
| 1148 | }, | 1148 | }, |
| | 1149 | .enum_tag => { |
| | 1150 | const int_val = try val.intFromEnum(ty, mod); |
| | 1151 | const int_ty = ty.intTagType(mod); |
| | 1152 | return try self.constant(int_ty, int_val, repr); |
| | 1153 | }, |
| 1149 | // TODO: We can handle most pointers here (decl refs etc), because now they emit an extra | 1154 | // TODO: We can handle most pointers here (decl refs etc), because now they emit an extra |
| 1150 | // OpVariable that is not really required. | 1155 | // OpVariable that is not really required. |
| 1151 | else => { | 1156 | else => { |