| ... | @@ -7651,7 +7651,6 @@ pub const Metadata = enum(u32) { | ... | @@ -7651,7 +7651,6 @@ pub const Metadata = enum(u32) { |
| 7651 | composite_vector_type, | 7651 | composite_vector_type, |
| 7652 | derived_pointer_type, | 7652 | derived_pointer_type, |
| 7653 | derived_member_type, | 7653 | derived_member_type, |
| 7654 | derived_static_member_type, | | |
| 7655 | derived_typedef, | 7654 | derived_typedef, |
| 7656 | imported_declaration, | 7655 | imported_declaration, |
| 7657 | subroutine_type, | 7656 | subroutine_type, |
| ... | @@ -7666,7 +7665,6 @@ pub const Metadata = enum(u32) { | ... | @@ -7666,7 +7665,6 @@ pub const Metadata = enum(u32) { |
| 7666 | parameter, | 7665 | parameter, |
| 7667 | global_var, | 7666 | global_var, |
| 7668 | @"global_var local", | 7667 | @"global_var local", |
| 7669 | @"global_var decl", | | |
| 7670 | global_var_expression, | 7668 | global_var_expression, |
| 7671 | constant, | 7669 | constant, |
| 7672 | | 7670 | |
| ... | @@ -7700,7 +7698,6 @@ pub const Metadata = enum(u32) { | ... | @@ -7700,7 +7698,6 @@ pub const Metadata = enum(u32) { |
| 7700 | .composite_vector_type, | 7698 | .composite_vector_type, |
| 7701 | .derived_pointer_type, | 7699 | .derived_pointer_type, |
| 7702 | .derived_member_type, | 7700 | .derived_member_type, |
| 7703 | .derived_static_member_type, | | |
| 7704 | .derived_typedef, | 7701 | .derived_typedef, |
| 7705 | .imported_declaration, | 7702 | .imported_declaration, |
| 7706 | .subroutine_type, | 7703 | .subroutine_type, |
| ... | @@ -7714,7 +7711,6 @@ pub const Metadata = enum(u32) { | ... | @@ -7714,7 +7711,6 @@ pub const Metadata = enum(u32) { |
| 7714 | .parameter, | 7711 | .parameter, |
| 7715 | .global_var, | 7712 | .global_var, |
| 7716 | .@"global_var local", | 7713 | .@"global_var local", |
| 7717 | .@"global_var decl", | | |
| 7718 | .global_var_expression, | 7714 | .global_var_expression, |
| 7719 | => false, | 7715 | => false, |
| 7720 | }; | 7716 | }; |
| ... | @@ -8008,12 +8004,6 @@ pub const Metadata = enum(u32) { | ... | @@ -8008,12 +8004,6 @@ pub const Metadata = enum(u32) { |
| 8008 | }; | 8004 | }; |
| 8009 | | 8005 | |
| 8010 | pub const GlobalVar = struct { | 8006 | pub const GlobalVar = struct { |
| 8011 | pub const Options = enum { | | |
| 8012 | internal, | | |
| 8013 | internal_decl, | | |
| 8014 | external, | | |
| 8015 | }; | | |
| 8016 | | | |
| 8017 | name: MetadataString, | 8007 | name: MetadataString, |
| 8018 | linkage_name: MetadataString, | 8008 | linkage_name: MetadataString, |
| 8019 | file: Metadata, | 8009 | file: Metadata, |
| ... | @@ -8021,7 +8011,6 @@ pub const Metadata = enum(u32) { | ... | @@ -8021,7 +8011,6 @@ pub const Metadata = enum(u32) { |
| 8021 | line: u32, | 8011 | line: u32, |
| 8022 | ty: Metadata, | 8012 | ty: Metadata, |
| 8023 | variable: Variable.Index, | 8013 | variable: Variable.Index, |
| 8024 | declaration: Metadata, | | |
| 8025 | }; | 8014 | }; |
| 8026 | | 8015 | |
| 8027 | pub const GlobalVarExpression = struct { | 8016 | pub const GlobalVarExpression = struct { |
| ... | @@ -10123,7 +10112,6 @@ pub fn printUnbuffered( | ... | @@ -10123,7 +10112,6 @@ pub fn printUnbuffered( |
| 10123 | }, | 10112 | }, |
| 10124 | .derived_pointer_type, | 10113 | .derived_pointer_type, |
| 10125 | .derived_member_type, | 10114 | .derived_member_type, |
| 10126 | .derived_static_member_type, | | |
| 10127 | .derived_typedef, | 10115 | .derived_typedef, |
| 10128 | => |kind| { | 10116 | => |kind| { |
| 10129 | const extra = self.metadataExtraData(Metadata.DerivedType, metadata_item.data); | 10117 | const extra = self.metadataExtraData(Metadata.DerivedType, metadata_item.data); |
| ... | @@ -10134,7 +10122,7 @@ pub fn printUnbuffered( | ... | @@ -10134,7 +10122,7 @@ pub fn printUnbuffered( |
| 10134 | DW_TAG_typedef, | 10122 | DW_TAG_typedef, |
| 10135 | }, switch (kind) { | 10123 | }, switch (kind) { |
| 10136 | .derived_pointer_type => .DW_TAG_pointer_type, | 10124 | .derived_pointer_type => .DW_TAG_pointer_type, |
| 10137 | .derived_member_type, .derived_static_member_type => .DW_TAG_member, | 10125 | .derived_member_type => .DW_TAG_member, |
| 10138 | .derived_typedef => .DW_TAG_typedef, | 10126 | .derived_typedef => .DW_TAG_typedef, |
| 10139 | else => unreachable, | 10127 | else => unreachable, |
| 10140 | }), | 10128 | }), |
| ... | @@ -10152,7 +10140,7 @@ pub fn printUnbuffered( | ... | @@ -10152,7 +10140,7 @@ pub fn printUnbuffered( |
| 10152 | 0 => null, | 10140 | 0 => null, |
| 10153 | else => |bit_offset| bit_offset, | 10141 | else => |bit_offset| bit_offset, |
| 10154 | }, | 10142 | }, |
| 10155 | .flags = null, // TODO staticness | 10143 | .flags = null, |
| 10156 | .extraData = null, | 10144 | .extraData = null, |
| 10157 | .dwarfAddressSpace = null, | 10145 | .dwarfAddressSpace = null, |
| 10158 | .annotations = null, | 10146 | .annotations = null, |
| ... | @@ -10288,7 +10276,6 @@ pub fn printUnbuffered( | ... | @@ -10288,7 +10276,6 @@ pub fn printUnbuffered( |
| 10288 | }, | 10276 | }, |
| 10289 | .global_var, | 10277 | .global_var, |
| 10290 | .@"global_var local", | 10278 | .@"global_var local", |
| 10291 | .@"global_var decl", | | |
| 10292 | => |kind| { | 10279 | => |kind| { |
| 10293 | const extra = self.metadataExtraData(Metadata.GlobalVar, metadata_item.data); | 10280 | const extra = self.metadataExtraData(Metadata.GlobalVar, metadata_item.data); |
| 10294 | try metadata_formatter.specialized(.@"distinct !", .DIGlobalVariable, .{ | 10281 | try metadata_formatter.specialized(.@"distinct !", .DIGlobalVariable, .{ |
| ... | @@ -10299,7 +10286,7 @@ pub fn printUnbuffered( | ... | @@ -10299,7 +10286,7 @@ pub fn printUnbuffered( |
| 10299 | .line = extra.line, | 10286 | .line = extra.line, |
| 10300 | .type = extra.ty, | 10287 | .type = extra.ty, |
| 10301 | .isLocal = kind != .global_var, | 10288 | .isLocal = kind != .global_var, |
| 10302 | .isDefinition = kind != .@"global_var decl", | 10289 | .isDefinition = true, |
| 10303 | .declaration = null, | 10290 | .declaration = null, |
| 10304 | .templateParams = null, | 10291 | .templateParams = null, |
| 10305 | .@"align" = null, | 10292 | .@"align" = null, |
| ... | @@ -11991,28 +11978,6 @@ pub fn debugPointerType( | ... | @@ -11991,28 +11978,6 @@ pub fn debugPointerType( |
| 11991 | ); | 11978 | ); |
| 11992 | } | 11979 | } |
| 11993 | | 11980 | |
| 11994 | pub fn debugStaticMemberType( | | |
| 11995 | self: *Builder, | | |
| 11996 | name: MetadataString, | | |
| 11997 | file: Metadata, | | |
| 11998 | scope: Metadata, | | |
| 11999 | line: u32, | | |
| 12000 | underlying_type: Metadata, | | |
| 12001 | ) Allocator.Error!Metadata { | | |
| 12002 | try self.ensureUnusedMetadataCapacity(1, Metadata.DerivedType, 0); | | |
| 12003 | return self.debugMemberTypeAssumeCapacity( | | |
| 12004 | name, | | |
| 12005 | file, | | |
| 12006 | scope, | | |
| 12007 | line, | | |
| 12008 | underlying_type, | | |
| 12009 | 0, | | |
| 12010 | 0, | | |
| 12011 | 0, | | |
| 12012 | true, | | |
| 12013 | ); | | |
| 12014 | } | | |
| 12015 | | | |
| 12016 | pub fn debugMemberType( | 11981 | pub fn debugMemberType( |
| 12017 | self: *Builder, | 11982 | self: *Builder, |
| 12018 | name: MetadataString, | 11983 | name: MetadataString, |
| ... | @@ -12034,7 +11999,6 @@ pub fn debugMemberType( | ... | @@ -12034,7 +11999,6 @@ pub fn debugMemberType( |
| 12034 | size_in_bits, | 11999 | size_in_bits, |
| 12035 | align_in_bits, | 12000 | align_in_bits, |
| 12036 | offset_in_bits, | 12001 | offset_in_bits, |
| 12037 | false, | | |
| 12038 | ); | 12002 | ); |
| 12039 | } | 12003 | } |
| 12040 | | 12004 | |
| ... | @@ -12175,8 +12139,7 @@ pub fn debugGlobalVar( | ... | @@ -12175,8 +12139,7 @@ pub fn debugGlobalVar( |
| 12175 | line: u32, | 12139 | line: u32, |
| 12176 | ty: Metadata, | 12140 | ty: Metadata, |
| 12177 | variable: Variable.Index, | 12141 | variable: Variable.Index, |
| 12178 | declaration: Metadata, | 12142 | internal: bool, |
| 12179 | options: Metadata.GlobalVar.Options, | | |
| 12180 | ) Allocator.Error!Metadata { | 12143 | ) Allocator.Error!Metadata { |
| 12181 | try self.ensureUnusedMetadataCapacity(1, Metadata.GlobalVar, 0); | 12144 | try self.ensureUnusedMetadataCapacity(1, Metadata.GlobalVar, 0); |
| 12182 | return self.debugGlobalVarAssumeCapacity( | 12145 | return self.debugGlobalVarAssumeCapacity( |
| ... | @@ -12187,8 +12150,7 @@ pub fn debugGlobalVar( | ... | @@ -12187,8 +12150,7 @@ pub fn debugGlobalVar( |
| 12187 | line, | 12150 | line, |
| 12188 | ty, | 12151 | ty, |
| 12189 | variable, | 12152 | variable, |
| 12190 | declaration, | 12153 | internal, |
| 12191 | options, | | |
| 12192 | ); | 12154 | ); |
| 12193 | } | 12155 | } |
| 12194 | | 12156 | |
| ... | @@ -12617,10 +12579,9 @@ fn debugMemberTypeAssumeCapacity( | ... | @@ -12617,10 +12579,9 @@ fn debugMemberTypeAssumeCapacity( |
| 12617 | size_in_bits: u64, | 12579 | size_in_bits: u64, |
| 12618 | align_in_bits: u64, | 12580 | align_in_bits: u64, |
| 12619 | offset_in_bits: u64, | 12581 | offset_in_bits: u64, |
| 12620 | static: bool, | | |
| 12621 | ) Metadata { | 12582 | ) Metadata { |
| 12622 | assert(!self.strip); | 12583 | assert(!self.strip); |
| 12623 | return self.metadataSimpleAssumeCapacity(if (static) .derived_static_member_type else .derived_member_type, Metadata.DerivedType{ | 12584 | return self.metadataSimpleAssumeCapacity(.derived_member_type, Metadata.DerivedType{ |
| 12624 | .name = name, | 12585 | .name = name, |
| 12625 | .file = file, | 12586 | .file = file, |
| 12626 | .scope = scope, | 12587 | .scope = scope, |
| ... | @@ -12888,16 +12849,11 @@ fn debugGlobalVarAssumeCapacity( | ... | @@ -12888,16 +12849,11 @@ fn debugGlobalVarAssumeCapacity( |
| 12888 | line: u32, | 12849 | line: u32, |
| 12889 | ty: Metadata, | 12850 | ty: Metadata, |
| 12890 | variable: Variable.Index, | 12851 | variable: Variable.Index, |
| 12891 | declaration: Metadata, | 12852 | internal: bool, |
| 12892 | options: Metadata.GlobalVar.Options, | | |
| 12893 | ) Metadata { | 12853 | ) Metadata { |
| 12894 | assert(!self.strip); | 12854 | assert(!self.strip); |
| 12895 | return self.metadataDistinctAssumeCapacity( | 12855 | return self.metadataDistinctAssumeCapacity( |
| 12896 | switch (options) { | 12856 | if (internal) .@"global_var local" else .global_var, |
| 12897 | .internal => .@"global_var local", | | |
| 12898 | .internal_decl => .@"global_var decl", | | |
| 12899 | .external => .global_var, | | |
| 12900 | }, | | |
| 12901 | Metadata.GlobalVar{ | 12857 | Metadata.GlobalVar{ |
| 12902 | .name = name, | 12858 | .name = name, |
| 12903 | .linkage_name = linkage_name, | 12859 | .linkage_name = linkage_name, |
| ... | @@ -12906,7 +12862,6 @@ fn debugGlobalVarAssumeCapacity( | ... | @@ -12906,7 +12862,6 @@ fn debugGlobalVarAssumeCapacity( |
| 12906 | .line = line, | 12862 | .line = line, |
| 12907 | .ty = ty, | 12863 | .ty = ty, |
| 12908 | .variable = variable, | 12864 | .variable = variable, |
| 12909 | .declaration = declaration, | | |
| 12910 | }, | 12865 | }, |
| 12911 | ); | 12866 | ); |
| 12912 | } | 12867 | } |
| ... | @@ -14024,14 +13979,13 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co | ... | @@ -14024,14 +13979,13 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 14024 | }, | 13979 | }, |
| 14025 | .derived_pointer_type, | 13980 | .derived_pointer_type, |
| 14026 | .derived_member_type, | 13981 | .derived_member_type, |
| 14027 | .derived_static_member_type, | | |
| 14028 | .derived_typedef, | 13982 | .derived_typedef, |
| 14029 | => |kind| { | 13983 | => |kind| { |
| 14030 | const extra = self.metadataExtraData(Metadata.DerivedType, data); | 13984 | const extra = self.metadataExtraData(Metadata.DerivedType, data); |
| 14031 | try metadata_block.writeAbbrevAdapted(MetadataBlock.DerivedType{ | 13985 | try metadata_block.writeAbbrevAdapted(MetadataBlock.DerivedType{ |
| 14032 | .tag = switch (kind) { | 13986 | .tag = switch (kind) { |
| 14033 | .derived_pointer_type => DW.TAG.pointer_type, | 13987 | .derived_pointer_type => DW.TAG.pointer_type, |
| 14034 | .derived_member_type, .derived_static_member_type => DW.TAG.member, | 13988 | .derived_member_type => DW.TAG.member, |
| 14035 | .derived_typedef => DW.TAG.typedef, | 13989 | .derived_typedef => DW.TAG.typedef, |
| 14036 | else => unreachable, | 13990 | else => unreachable, |
| 14037 | }, | 13991 | }, |
| ... | @@ -14044,7 +13998,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co | ... | @@ -14044,7 +13998,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 14044 | .align_in_bits = extra.bitAlign(), | 13998 | .align_in_bits = extra.bitAlign(), |
| 14045 | .offset_in_bits = extra.bitOffset(), | 13999 | .offset_in_bits = extra.bitOffset(), |
| 14046 | .flags = .{ | 14000 | .flags = .{ |
| 14047 | .StaticMember = kind == .derived_static_member_type, | 14001 | .StaticMember = false, |
| 14048 | }, | 14002 | }, |
| 14049 | }, metadata_adapter); | 14003 | }, metadata_adapter); |
| 14050 | }, | 14004 | }, |
| ... | @@ -14184,7 +14138,6 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co | ... | @@ -14184,7 +14138,6 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 14184 | }, | 14138 | }, |
| 14185 | .global_var, | 14139 | .global_var, |
| 14186 | .@"global_var local", | 14140 | .@"global_var local", |
| 14187 | .@"global_var decl", | | |
| 14188 | => |kind| { | 14141 | => |kind| { |
| 14189 | const extra = self.metadataExtraData(Metadata.GlobalVar, data); | 14142 | const extra = self.metadataExtraData(Metadata.GlobalVar, data); |
| 14190 | try metadata_block.writeAbbrevAdapted(MetadataBlock.GlobalVar{ | 14143 | try metadata_block.writeAbbrevAdapted(MetadataBlock.GlobalVar{ |
| ... | @@ -14195,8 +14148,6 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co | ... | @@ -14195,8 +14148,6 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 14195 | .line = extra.line, | 14148 | .line = extra.line, |
| 14196 | .ty = extra.ty, | 14149 | .ty = extra.ty, |
| 14197 | .local = kind == .@"global_var local", | 14150 | .local = kind == .@"global_var local", |
| 14198 | .defined = kind != .@"global_var decl", | | |
| 14199 | .declaration = extra.declaration, | | |
| 14200 | }, metadata_adapter); | 14151 | }, metadata_adapter); |
| 14201 | }, | 14152 | }, |
| 14202 | .global_var_expression => { | 14153 | .global_var_expression => { |