| ... | ... | @@ -13015,18 +13015,23 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 13015 | 13015 | .string = extra.id.slice(self).?, |
| 13016 | 13016 | }); |
| 13017 | 13017 | |
| 13018 | | const real_struct = self.type_items.items[@intFromEnum(extra.body)]; |
| 13019 | | const is_packed: bool = switch (real_struct.tag) { |
| 13020 | | .structure => false, |
| 13021 | | .packed_structure => true, |
| 13022 | | else => unreachable, |
| 13023 | | }; |
| 13018 | switch (extra.body) { |
| 13019 | .none => try type_block.writeAbbrev(ir.Type.Opaque{}), |
| 13020 | else => { |
| 13021 | const real_struct = self.type_items.items[@intFromEnum(extra.body)]; |
| 13022 | const is_packed: bool = switch (real_struct.tag) { |
| 13023 | .structure => false, |
| 13024 | .packed_structure => true, |
| 13025 | else => unreachable, |
| 13026 | }; |
| 13024 | 13027 | |
| 13025 | | var real_extra = self.typeExtraDataTrail(Type.Structure, real_struct.data); |
| 13026 | | try type_block.writeAbbrev(ir.Type.StructNamed{ |
| 13027 | | .is_packed = is_packed, |
| 13028 | | .types = real_extra.trail.next(real_extra.data.fields_len, Type, self), |
| 13029 | | }); |
| 13028 | var real_extra = self.typeExtraDataTrail(Type.Structure, real_struct.data); |
| 13029 | try type_block.writeAbbrev(ir.Type.StructNamed{ |
| 13030 | .is_packed = is_packed, |
| 13031 | .types = real_extra.trail.next(real_extra.data.fields_len, Type, self), |
| 13032 | }); |
| 13033 | }, |
| 13034 | } |
| 13030 | 13035 | }, |
| 13031 | 13036 | .array, |
| 13032 | 13037 | .small_array, |