| ... | @@ -7608,6 +7608,7 @@ pub const Metadata = enum(u32) { | ... | @@ -7608,6 +7608,7 @@ pub const Metadata = enum(u32) { |
| 7608 | composite_union_type, | 7608 | composite_union_type, |
| 7609 | composite_enumeration_type, | 7609 | composite_enumeration_type, |
| 7610 | composite_array_type, | 7610 | composite_array_type, |
| | 7611 | composite_vector_type, |
| 7611 | derived_pointer_type, | 7612 | derived_pointer_type, |
| 7612 | derived_member_type, | 7613 | derived_member_type, |
| 7613 | subroutine_type, | 7614 | subroutine_type, |
| ... | @@ -11173,6 +11174,30 @@ pub fn debugArrayType( | ... | @@ -11173,6 +11174,30 @@ pub fn debugArrayType( |
| 11173 | ); | 11174 | ); |
| 11174 | } | 11175 | } |
| 11175 | | 11176 | |
| | 11177 | pub fn debugVectorType( |
| | 11178 | self: *Builder, |
| | 11179 | name: MetadataString, |
| | 11180 | file: Metadata, |
| | 11181 | scope: Metadata, |
| | 11182 | line: u32, |
| | 11183 | underlying_type: Metadata, |
| | 11184 | size_in_bits: u64, |
| | 11185 | align_in_bits: u64, |
| | 11186 | fields_tuple: Metadata, |
| | 11187 | ) Allocator.Error!Metadata { |
| | 11188 | try self.ensureUnusedMetadataCapacity(1, Metadata.CompositeType, 0); |
| | 11189 | return self.debugVectorTypeAssumeCapacity( |
| | 11190 | name, |
| | 11191 | file, |
| | 11192 | scope, |
| | 11193 | line, |
| | 11194 | underlying_type, |
| | 11195 | size_in_bits, |
| | 11196 | align_in_bits, |
| | 11197 | fields_tuple, |
| | 11198 | ); |
| | 11199 | } |
| | 11200 | |
| 11176 | pub fn debugPointerType( | 11201 | pub fn debugPointerType( |
| 11177 | self: *Builder, | 11202 | self: *Builder, |
| 11178 | name: MetadataString, | 11203 | name: MetadataString, |
| ... | @@ -11626,6 +11651,30 @@ fn debugArrayTypeAssumeCapacity( | ... | @@ -11626,6 +11651,30 @@ fn debugArrayTypeAssumeCapacity( |
| 11626 | ); | 11651 | ); |
| 11627 | } | 11652 | } |
| 11628 | | 11653 | |
| | 11654 | fn debugVectorTypeAssumeCapacity( |
| | 11655 | self: *Builder, |
| | 11656 | name: MetadataString, |
| | 11657 | file: Metadata, |
| | 11658 | scope: Metadata, |
| | 11659 | line: u32, |
| | 11660 | underlying_type: Metadata, |
| | 11661 | size_in_bits: u64, |
| | 11662 | align_in_bits: u64, |
| | 11663 | fields_tuple: Metadata, |
| | 11664 | ) Metadata { |
| | 11665 | return self.debugCompositeTypeAssumeCapacity( |
| | 11666 | .composite_vector_type, |
| | 11667 | name, |
| | 11668 | file, |
| | 11669 | scope, |
| | 11670 | line, |
| | 11671 | underlying_type, |
| | 11672 | size_in_bits, |
| | 11673 | align_in_bits, |
| | 11674 | fields_tuple, |
| | 11675 | ); |
| | 11676 | } |
| | 11677 | |
| 11629 | fn debugCompositeTypeAssumeCapacity( | 11678 | fn debugCompositeTypeAssumeCapacity( |
| 11630 | self: *Builder, | 11679 | self: *Builder, |
| 11631 | tag: Metadata.Tag, | 11680 | tag: Metadata.Tag, |
| ... | @@ -13166,6 +13215,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co | ... | @@ -13166,6 +13215,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 13166 | .composite_union_type, | 13215 | .composite_union_type, |
| 13167 | .composite_enumeration_type, | 13216 | .composite_enumeration_type, |
| 13168 | .composite_array_type, | 13217 | .composite_array_type, |
| | 13218 | .composite_vector_type, |
| 13169 | => |kind| { | 13219 | => |kind| { |
| 13170 | const extra = self.metadataExtraData(Metadata.CompositeType, data); | 13220 | const extra = self.metadataExtraData(Metadata.CompositeType, data); |
| 13171 | | 13221 | |
| ... | @@ -13174,7 +13224,9 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co | ... | @@ -13174,7 +13224,9 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 13174 | .composite_struct_type => std.dwarf.TAG.structure_type, | 13224 | .composite_struct_type => std.dwarf.TAG.structure_type, |
| 13175 | .composite_union_type => std.dwarf.TAG.union_type, | 13225 | .composite_union_type => std.dwarf.TAG.union_type, |
| 13176 | .composite_enumeration_type => std.dwarf.TAG.enumeration_type, | 13226 | .composite_enumeration_type => std.dwarf.TAG.enumeration_type, |
| 13177 | .composite_array_type => std.dwarf.TAG.array_type, | 13227 | .composite_array_type, |
| | 13228 | .composite_vector_type, |
| | 13229 | => std.dwarf.TAG.array_type, |
| 13178 | else => unreachable, | 13230 | else => unreachable, |
| 13179 | }, | 13231 | }, |
| 13180 | .name = extra.name, | 13232 | .name = extra.name, |
| ... | @@ -13184,6 +13236,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co | ... | @@ -13184,6 +13236,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 13184 | .underlying_type = extra.underlying_type, | 13236 | .underlying_type = extra.underlying_type, |
| 13185 | .size_in_bits = @as(u64, extra.size_in_bits_lo) | @as(u64, extra.size_in_bits_hi) << 32, | 13237 | .size_in_bits = @as(u64, extra.size_in_bits_lo) | @as(u64, extra.size_in_bits_hi) << 32, |
| 13186 | .align_in_bits = @as(u64, extra.align_in_bits_lo) | @as(u64, extra.align_in_bits_hi) << 32, | 13238 | .align_in_bits = @as(u64, extra.align_in_bits_lo) | @as(u64, extra.align_in_bits_hi) << 32, |
| | 13239 | .flags = if (kind == .composite_vector_type) DIFlags.Vector else 0, |
| 13187 | .elements = extra.fields_tuple, | 13240 | .elements = extra.fields_tuple, |
| 13188 | }, metadata_adapter); | 13241 | }, metadata_adapter); |
| 13189 | }, | 13242 | }, |