| ... | ... | @@ -2897,43 +2897,52 @@ fn updateConstInner( |
| 2897 | 2897 | const loaded_struct = ip.loadStructType(@"const"); |
| 2898 | 2898 | const src_inst = loaded_struct.zir_index.resolveFull(ip).?; |
| 2899 | 2899 | const zf = zcu.fileByIndex(src_inst.file); |
| 2900 | const is_empty = loaded_struct.captures.len == 0 and loaded_struct.field_types.len == 0; |
| 2900 | 2901 | if (src_inst.inst == .main_struct_inst) { |
| 2901 | 2902 | assert(loaded_struct.captures.len == 0); |
| 2902 | 2903 | const ui = dwarf.getUnit(zf.mod.?); |
| 2903 | 2904 | _, const fi = try ui.get(dwarf).getFile(zcu.gpa, ui, src_inst.file); |
| 2904 | 2905 | try dwarf.abbrevCode(di_nw, switch (loaded_struct.layout) { |
| 2905 | | .auto => if (loaded_struct.field_types.len > 0) .file else .empty_file, |
| 2906 | .auto => if (is_empty) .empty_file else .file, |
| 2906 | 2907 | .@"extern", .@"packed" => unreachable, |
| 2907 | 2908 | }); |
| 2908 | 2909 | try di_w.writeUleb128(@backingInt(fi)); |
| 2909 | 2910 | try dwarf.strx(di_nw, loaded_struct.name.toSlice(ip)); |
| 2910 | 2911 | } else if (loaded_struct.captures.len > 0 or loaded_struct.is_reified) { |
| 2911 | | try dwarf.abbrevCode(di_nw, if (loaded_struct.captures.len > 0 or |
| 2912 | | loaded_struct.field_types.len > 0) switch (loaded_struct.layout) { |
| 2913 | | .auto, .@"extern" => .decl_instance_struct, |
| 2914 | | .@"packed" => .decl_instance_packed_struct, |
| 2915 | | } else switch (loaded_struct.layout) { |
| 2916 | | .auto, .@"extern" => .decl_instance_empty_struct, |
| 2917 | | .@"packed" => .decl_instance_empty_packed_struct, |
| 2912 | try dwarf.abbrevCode(di_nw, switch (loaded_struct.name_nav) { |
| 2913 | else => if (is_empty) switch (loaded_struct.layout) { |
| 2914 | .auto, .@"extern" => .decl_instance_empty_struct, |
| 2915 | .@"packed" => .decl_instance_empty_packed_struct, |
| 2916 | } else switch (loaded_struct.layout) { |
| 2917 | .auto, .@"extern" => .decl_instance_struct, |
| 2918 | .@"packed" => .decl_instance_packed_struct, |
| 2919 | }, |
| 2920 | .none => if (is_empty) switch (loaded_struct.layout) { |
| 2921 | .auto, .@"extern" => .type_decl_instance_empty_struct, |
| 2922 | .@"packed" => .type_decl_instance_empty_packed_struct, |
| 2923 | } else switch (loaded_struct.layout) { |
| 2924 | .auto, .@"extern" => .type_decl_instance_struct, |
| 2925 | .@"packed" => .type_decl_instance_packed_struct, |
| 2926 | }, |
| 2918 | 2927 | }); |
| 2919 | 2928 | try dwarf.refType(pt, di_nw, .fromInterned(ip.namespacePtr( |
| 2920 | 2929 | ip.namespacePtr(loaded_struct.namespace).parent.unwrap().?, |
| 2921 | 2930 | ).owner_type)); |
| 2922 | 2931 | try dwarf.secOffset(di_nw, try dwarf.getConstDecl(pt, @"const"), 0); |
| 2932 | if (loaded_struct.name_nav == .none) |
| 2933 | try dwarf.strx(di_nw, loaded_struct.name.toSlice(ip)); |
| 2923 | 2934 | } else if (loaded_struct.name_nav.unwrap()) |name_ni| { |
| 2924 | 2935 | const name_nav = ip.getNav(name_ni); |
| 2925 | 2936 | const decl = zf.zir.?.getDeclaration(name_nav.srcInst(ip).resolve(ip).?); |
| 2926 | 2937 | const parent_ni = try dwarf.getConstDecl(pt, ip.namespacePtr( |
| 2927 | 2938 | name_nav.analysis.?.namespace, |
| 2928 | 2939 | ).owner_type); |
| 2929 | | try dwarf.abbrevCode(di_nw, if (loaded_struct.field_types.len > 0) |
| 2930 | | switch (loaded_struct.layout) { |
| 2931 | | .auto, .@"extern" => .decl_struct, |
| 2932 | | .@"packed" => .decl_packed_struct, |
| 2933 | | } |
| 2934 | | else switch (loaded_struct.layout) { |
| 2940 | try dwarf.abbrevCode(di_nw, if (is_empty) switch (loaded_struct.layout) { |
| 2935 | 2941 | .auto, .@"extern" => .decl_empty_struct, |
| 2936 | 2942 | .@"packed" => .decl_empty_packed_struct, |
| 2943 | } else switch (loaded_struct.layout) { |
| 2944 | .auto, .@"extern" => .decl_struct, |
| 2945 | .@"packed" => .decl_packed_struct, |
| 2937 | 2946 | }); |
| 2938 | 2947 | try dwarf.secOffset(di_nw, parent_ni, 0); |
| 2939 | 2948 | try di_w.writeInt(u32, decl.src_line + 1, dwarf.endian); |
| ... | ... | @@ -2945,14 +2954,12 @@ fn updateConstInner( |
| 2945 | 2954 | const parent_ni = try dwarf.getConstDecl(pt, ip.namespacePtr( |
| 2946 | 2955 | ip.namespacePtr(loaded_struct.namespace).parent.unwrap().?, |
| 2947 | 2956 | ).owner_type); |
| 2948 | | try dwarf.abbrevCode(di_nw, if (loaded_struct.field_types.len > 0) |
| 2949 | | switch (loaded_struct.layout) { |
| 2950 | | .auto, .@"extern" => .type_decl_struct, |
| 2951 | | .@"packed" => .type_decl_packed_struct, |
| 2952 | | } |
| 2953 | | else switch (loaded_struct.layout) { |
| 2957 | try dwarf.abbrevCode(di_nw, if (is_empty) switch (loaded_struct.layout) { |
| 2954 | 2958 | .auto, .@"extern" => .type_decl_empty_struct, |
| 2955 | 2959 | .@"packed" => .type_decl_empty_packed_struct, |
| 2960 | } else switch (loaded_struct.layout) { |
| 2961 | .auto, .@"extern" => .type_decl_struct, |
| 2962 | .@"packed" => .type_decl_packed_struct, |
| 2956 | 2963 | }); |
| 2957 | 2964 | try dwarf.secOffset(di_nw, parent_ni, 0); |
| 2958 | 2965 | try di_w.writeInt(u32, decl.src_line + 1, dwarf.endian); |
| ... | ... | @@ -3033,41 +3040,49 @@ fn updateConstInner( |
| 3033 | 3040 | } |
| 3034 | 3041 | }, |
| 3035 | 3042 | } |
| 3036 | | if (loaded_struct.captures.len > 0 or loaded_struct.field_types.len > 0) |
| 3037 | | try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 3043 | if (!is_empty) try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 3038 | 3044 | }, |
| 3039 | 3045 | .union_type => { |
| 3040 | 3046 | const loaded_union = ip.loadUnionType(@"const"); |
| 3041 | 3047 | const loaded_tag = ip.loadEnumType(loaded_union.enum_tag_type); |
| 3042 | 3048 | const zfi = loaded_union.zir_index.resolveFile(ip); |
| 3043 | 3049 | const zf = zcu.fileByIndex(zfi); |
| 3050 | const is_empty = loaded_union.captures.len == 0 and loaded_union.field_types.len == 0; |
| 3044 | 3051 | if (loaded_union.captures.len > 0 or loaded_union.is_reified) { |
| 3045 | | try dwarf.abbrevCode(di_nw, if (loaded_union.captures.len > 0 or |
| 3046 | | loaded_union.field_types.len > 0) switch (loaded_union.layout) { |
| 3047 | | .auto, .@"extern" => .decl_instance_union, |
| 3048 | | .@"packed" => .decl_instance_packed_union, |
| 3049 | | } else switch (loaded_union.layout) { |
| 3050 | | .auto, .@"extern" => .decl_instance_empty_union, |
| 3051 | | .@"packed" => .decl_instance_empty_packed_union, |
| 3052 | try dwarf.abbrevCode(di_nw, switch (loaded_union.name_nav) { |
| 3053 | else => if (is_empty) switch (loaded_union.layout) { |
| 3054 | .auto, .@"extern" => .decl_instance_empty_union, |
| 3055 | .@"packed" => .decl_instance_empty_packed_union, |
| 3056 | } else switch (loaded_union.layout) { |
| 3057 | .auto, .@"extern" => .decl_instance_union, |
| 3058 | .@"packed" => .decl_instance_packed_union, |
| 3059 | }, |
| 3060 | .none => if (is_empty) switch (loaded_union.layout) { |
| 3061 | .auto, .@"extern" => .type_decl_instance_empty_union, |
| 3062 | .@"packed" => .type_decl_instance_empty_packed_union, |
| 3063 | } else switch (loaded_union.layout) { |
| 3064 | .auto, .@"extern" => .type_decl_instance_union, |
| 3065 | .@"packed" => .type_decl_instance_packed_union, |
| 3066 | }, |
| 3052 | 3067 | }); |
| 3053 | 3068 | try dwarf.refType(pt, di_nw, .fromInterned(ip.namespacePtr( |
| 3054 | 3069 | ip.namespacePtr(loaded_union.namespace).parent.unwrap().?, |
| 3055 | 3070 | ).owner_type)); |
| 3056 | 3071 | try dwarf.secOffset(di_nw, try dwarf.getConstDecl(pt, @"const"), 0); |
| 3072 | if (loaded_union.name_nav == .none) |
| 3073 | try dwarf.strx(di_nw, loaded_union.name.toSlice(ip)); |
| 3057 | 3074 | } else if (loaded_union.name_nav.unwrap()) |name_ni| { |
| 3058 | 3075 | const name_nav = ip.getNav(name_ni); |
| 3059 | 3076 | const decl = zf.zir.?.getDeclaration(name_nav.srcInst(ip).resolve(ip).?); |
| 3060 | 3077 | const parent_ni = try dwarf.getConstDecl(pt, ip.namespacePtr( |
| 3061 | 3078 | name_nav.analysis.?.namespace, |
| 3062 | 3079 | ).owner_type); |
| 3063 | | try dwarf.abbrevCode(di_nw, if (loaded_union.field_types.len > 0) |
| 3064 | | switch (loaded_union.layout) { |
| 3065 | | .auto, .@"extern" => .decl_union, |
| 3066 | | .@"packed" => .decl_packed_union, |
| 3067 | | } |
| 3068 | | else switch (loaded_union.layout) { |
| 3080 | try dwarf.abbrevCode(di_nw, if (is_empty) switch (loaded_union.layout) { |
| 3069 | 3081 | .auto, .@"extern" => .decl_empty_union, |
| 3070 | 3082 | .@"packed" => .decl_empty_packed_union, |
| 3083 | } else switch (loaded_union.layout) { |
| 3084 | .auto, .@"extern" => .decl_union, |
| 3085 | .@"packed" => .decl_packed_union, |
| 3071 | 3086 | }); |
| 3072 | 3087 | try dwarf.secOffset(di_nw, parent_ni, 0); |
| 3073 | 3088 | try di_w.writeInt(u32, decl.src_line + 1, dwarf.endian); |
| ... | ... | @@ -3079,14 +3094,12 @@ fn updateConstInner( |
| 3079 | 3094 | const parent_ni = try dwarf.getConstDecl(pt, ip.namespacePtr( |
| 3080 | 3095 | ip.namespacePtr(loaded_union.namespace).parent.unwrap().?, |
| 3081 | 3096 | ).owner_type); |
| 3082 | | try dwarf.abbrevCode(di_nw, if (loaded_union.field_types.len > 0) |
| 3083 | | switch (loaded_union.layout) { |
| 3084 | | .auto, .@"extern" => .type_decl_union, |
| 3085 | | .@"packed" => .type_decl_packed_union, |
| 3086 | | } |
| 3087 | | else switch (loaded_union.layout) { |
| 3097 | try dwarf.abbrevCode(di_nw, if (is_empty) switch (loaded_union.layout) { |
| 3088 | 3098 | .auto, .@"extern" => .type_decl_empty_union, |
| 3089 | 3099 | .@"packed" => .type_decl_empty_packed_union, |
| 3100 | } else switch (loaded_union.layout) { |
| 3101 | .auto, .@"extern" => .type_decl_union, |
| 3102 | .@"packed" => .type_decl_packed_union, |
| 3090 | 3103 | }); |
| 3091 | 3104 | try dwarf.secOffset(di_nw, parent_ni, 0); |
| 3092 | 3105 | try di_w.writeInt(u32, decl.src_line + 1, dwarf.endian); |
| ... | ... | @@ -3169,26 +3182,30 @@ fn updateConstInner( |
| 3169 | 3182 | } |
| 3170 | 3183 | }, |
| 3171 | 3184 | } |
| 3172 | | if (loaded_union.captures.len > 0 or loaded_union.field_types.len > 0) |
| 3173 | | try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 3185 | if (!is_empty) try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 3174 | 3186 | }, |
| 3175 | 3187 | .enum_type => { |
| 3176 | 3188 | const loaded_enum = ip.loadEnumType(@"const"); |
| 3189 | const is_empty = loaded_enum.captures.len == 0 and loaded_enum.field_names.len == 0; |
| 3177 | 3190 | switch (loaded_enum.owner_union) { |
| 3178 | 3191 | .none => { |
| 3179 | 3192 | const zfi = loaded_enum.zir_index.unwrap().?.resolveFile(ip); |
| 3180 | 3193 | const zf = zcu.fileByIndex(zfi); |
| 3181 | 3194 | const zir = &zf.zir.?; |
| 3182 | 3195 | if (loaded_enum.captures.len > 0 or loaded_enum.is_reified) { |
| 3183 | | try dwarf.abbrevCode(di_nw, if (loaded_enum.captures.len > 0 or |
| 3184 | | loaded_enum.field_names.len > 0) |
| 3185 | | .decl_instance_enum |
| 3186 | | else |
| 3187 | | .decl_instance_empty_enum); |
| 3196 | try dwarf.abbrevCode(di_nw, switch (loaded_enum.name_nav) { |
| 3197 | else => if (is_empty) .decl_instance_empty_enum else .decl_instance_enum, |
| 3198 | .none => if (is_empty) |
| 3199 | .type_decl_instance_empty_enum |
| 3200 | else |
| 3201 | .type_decl_instance_enum, |
| 3202 | }); |
| 3188 | 3203 | try dwarf.refType(pt, di_nw, .fromInterned(ip.namespacePtr( |
| 3189 | 3204 | ip.namespacePtr(loaded_enum.namespace).parent.unwrap().?, |
| 3190 | 3205 | ).owner_type)); |
| 3191 | 3206 | try dwarf.secOffset(di_nw, try dwarf.getConstDecl(pt, @"const"), 0); |
| 3207 | if (loaded_enum.name_nav == .none) |
| 3208 | try dwarf.strx(di_nw, loaded_enum.name.toSlice(ip)); |
| 3192 | 3209 | } else if (loaded_enum.name_nav.unwrap()) |name_ni| { |
| 3193 | 3210 | const name_nav = ip.getNav(name_ni); |
| 3194 | 3211 | const decl = zir.getDeclaration(name_nav.srcInst(ip).resolve(ip).?); |
| ... | ... | @@ -3197,7 +3214,7 @@ fn updateConstInner( |
| 3197 | 3214 | ).owner_type); |
| 3198 | 3215 | try dwarf.abbrevCode( |
| 3199 | 3216 | di_nw, |
| 3200 | | if (loaded_enum.field_names.len > 0) .decl_enum else .decl_empty_enum, |
| 3217 | if (is_empty) .decl_empty_enum else .decl_enum, |
| 3201 | 3218 | ); |
| 3202 | 3219 | try dwarf.secOffset(di_nw, parent_ni, 0); |
| 3203 | 3220 | try di_w.writeInt(u32, decl.src_line + 1, dwarf.endian); |
| ... | ... | @@ -3209,10 +3226,10 @@ fn updateConstInner( |
| 3209 | 3226 | const parent_ni = try dwarf.getConstDecl(pt, ip.namespacePtr( |
| 3210 | 3227 | ip.namespacePtr(loaded_enum.namespace).parent.unwrap().?, |
| 3211 | 3228 | ).owner_type); |
| 3212 | | try dwarf.abbrevCode(di_nw, if (loaded_enum.field_names.len > 0) |
| 3213 | | .type_decl_enum |
| 3214 | | else |
| 3215 | | .type_decl_empty_enum); |
| 3229 | try dwarf.abbrevCode( |
| 3230 | di_nw, |
| 3231 | if (is_empty) .type_decl_empty_enum else .type_decl_enum, |
| 3232 | ); |
| 3216 | 3233 | try dwarf.secOffset(di_nw, parent_ni, 0); |
| 3217 | 3234 | try di_w.writeInt(u32, decl.src_line + 1, dwarf.endian); |
| 3218 | 3235 | try di_w.writeUleb128(decl.src_column + 1); |
| ... | ... | @@ -3220,10 +3237,10 @@ fn updateConstInner( |
| 3220 | 3237 | } |
| 3221 | 3238 | }, |
| 3222 | 3239 | else => { |
| 3223 | | try dwarf.abbrevCode(di_nw, if (loaded_enum.field_names.len > 0) |
| 3224 | | .generated_enum_type |
| 3225 | | else |
| 3226 | | .generated_empty_enum_type); |
| 3240 | try dwarf.abbrevCode( |
| 3241 | di_nw, |
| 3242 | if (is_empty) .generated_empty_enum_type else .generated_enum_type, |
| 3243 | ); |
| 3227 | 3244 | try dwarf.strx(di_nw, loaded_enum.fqn.toSlice(ip)); |
| 3228 | 3245 | }, |
| 3229 | 3246 | } |
| ... | ... | @@ -3234,8 +3251,7 @@ fn updateConstInner( |
| 3234 | 3251 | try dwarf.enumConstValue(di_w, loaded_enum, field_index); |
| 3235 | 3252 | try dwarf.strx(di_nw, loaded_enum.field_names.get(ip)[field_index].toSlice(ip)); |
| 3236 | 3253 | } |
| 3237 | | if (loaded_enum.captures.len > 0 or loaded_enum.field_names.len > 0) |
| 3238 | | try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 3254 | if (!is_empty) try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 3239 | 3255 | }, |
| 3240 | 3256 | // no defined size, so lowered the same as incomplete struct types |
| 3241 | 3257 | .opaque_type => return dwarf.updateConstIncompleteInner(pt, di_nw, @"const"), |
| ... | ... | @@ -4151,7 +4167,7 @@ fn genDeclInner( |
| 4151 | 4167 | done: switch (instance) { |
| 4152 | 4168 | .none => unreachable, |
| 4153 | 4169 | .@"const" => |@"const"| { |
| 4154 | | const kind: enum { @"struct", @"union", @"enum" }, const zf, const src_line, const src_column, const capture_names, const captures, const name, const maybe_name_nav, const namespace = container: switch (ip.indexToKey(instance.@"const")) { |
| 4170 | const kind: enum { @"struct", @"union", @"enum" }, const zf, const src_line, const src_column, const capture_names, const captures, const maybe_name_nav, const namespace = container: switch (ip.indexToKey(instance.@"const")) { |
| 4155 | 4171 | else => unreachable, |
| 4156 | 4172 | .struct_type => { |
| 4157 | 4173 | const loaded_struct = ip.loadStructType(@"const"); |
| ... | ... | @@ -4200,7 +4216,6 @@ fn genDeclInner( |
| 4200 | 4216 | src_column, |
| 4201 | 4217 | capture_names, |
| 4202 | 4218 | loaded_struct.captures, |
| 4203 | | loaded_struct.name, |
| 4204 | 4219 | loaded_struct.name_nav, |
| 4205 | 4220 | loaded_struct.namespace, |
| 4206 | 4221 | }; |
| ... | ... | @@ -4238,7 +4253,6 @@ fn genDeclInner( |
| 4238 | 4253 | src_column, |
| 4239 | 4254 | capture_names, |
| 4240 | 4255 | loaded_union.captures, |
| 4241 | | loaded_union.name, |
| 4242 | 4256 | loaded_union.name_nav, |
| 4243 | 4257 | loaded_union.namespace, |
| 4244 | 4258 | }; |
| ... | ... | @@ -4276,7 +4290,6 @@ fn genDeclInner( |
| 4276 | 4290 | src_column, |
| 4277 | 4291 | capture_names, |
| 4278 | 4292 | loaded_enum.captures, |
| 4279 | | loaded_enum.name, |
| 4280 | 4293 | loaded_enum.name_nav, |
| 4281 | 4294 | loaded_enum.namespace, |
| 4282 | 4295 | }; |
| ... | ... | @@ -4296,7 +4309,6 @@ fn genDeclInner( |
| 4296 | 4309 | decl.src_column, |
| 4297 | 4310 | decl.capture_names, |
| 4298 | 4311 | loaded_opaque.captures, |
| 4299 | | loaded_opaque.name, |
| 4300 | 4312 | loaded_opaque.name_nav, |
| 4301 | 4313 | loaded_opaque.namespace, |
| 4302 | 4314 | }; |
| ... | ... | @@ -4340,7 +4352,7 @@ fn genDeclInner( |
| 4340 | 4352 | try di_w.writeInt(u32, decl.src_line + 1, dwarf.endian); |
| 4341 | 4353 | try di_w.writeUleb128(decl.src_column + 1); |
| 4342 | 4354 | try di_w.writeByte(if (decl.is_pub) DW.ACCESS.public else DW.ACCESS.private); |
| 4343 | | try dwarf.strx(di_nw, name.toSlice(ip)); |
| 4355 | try dwarf.strx(di_nw, name_nav.name.toSlice(ip)); |
| 4344 | 4356 | } else { |
| 4345 | 4357 | const parent_ni = try dwarf.getConstDecl(pt, ip.namespacePtr( |
| 4346 | 4358 | ip.namespacePtr(namespace).parent.unwrap().?, |
| ... | ... | @@ -4357,7 +4369,6 @@ fn genDeclInner( |
| 4357 | 4369 | try dwarf.secOffset(di_nw, parent_ni, 0); |
| 4358 | 4370 | try di_w.writeInt(u32, src_line + 1, dwarf.endian); |
| 4359 | 4371 | try di_w.writeUleb128(src_column + 1); |
| 4360 | | try dwarf.strx(di_nw, name.toSlice(ip)); |
| 4361 | 4372 | } |
| 4362 | 4373 | for (capture_names, captures.get(ip)) |capture_name, capture| { |
| 4363 | 4374 | try dwarf.abbrevCode(di_nw, .capture_specification); |
| ... | ... | @@ -4409,9 +4420,12 @@ pub fn updateLineNumber( |
| 4409 | 4420 | ) void { |
| 4410 | 4421 | const di = dwarf.getDeclIfExists(inst) orelse return; |
| 4411 | 4422 | const decl_ni = di.get(dwarf).debug_info_ni.unwrap().?; |
| 4423 | comptime assert(AbbrevCode.common_decl_attrs[0][1] == .ref_addr); |
| 4424 | comptime assert(AbbrevCode.common_decl_attrs[1][0] == .decl_line); |
| 4425 | comptime assert(AbbrevCode.common_decl_attrs[1][1] == .data4); |
| 4412 | 4426 | std.mem.writeInt( |
| 4413 | 4427 | u32, |
| 4414 | | decl_ni.slice(mf)[AbbrevCode.decl_size..][0..4], |
| 4428 | decl_ni.slice(mf)[AbbrevCode.decl_size + dwarf.secOffsetSize() ..][0..4], |
| 4415 | 4429 | line + 1, |
| 4416 | 4430 | dwarf.endian, |
| 4417 | 4431 | ); |
| ... | ... | @@ -4806,18 +4820,28 @@ pub const AbbrevCode = enum { |
| 4806 | 4820 | decl_instance_incomplete_enum, |
| 4807 | 4821 | decl_instance_empty_enum, |
| 4808 | 4822 | decl_instance_enum, |
| 4823 | type_decl_instance_empty_enum, |
| 4824 | type_decl_instance_enum, |
| 4809 | 4825 | decl_instance_empty_incomplete_struct, |
| 4810 | 4826 | decl_instance_incomplete_struct, |
| 4811 | 4827 | decl_instance_empty_struct, |
| 4812 | 4828 | decl_instance_struct, |
| 4829 | type_decl_instance_empty_struct, |
| 4830 | type_decl_instance_struct, |
| 4813 | 4831 | decl_instance_empty_packed_struct, |
| 4814 | 4832 | decl_instance_packed_struct, |
| 4833 | type_decl_instance_empty_packed_struct, |
| 4834 | type_decl_instance_packed_struct, |
| 4815 | 4835 | decl_instance_empty_incomplete_union, |
| 4816 | 4836 | decl_instance_incomplete_union, |
| 4817 | 4837 | decl_instance_empty_union, |
| 4818 | 4838 | decl_instance_union, |
| 4839 | type_decl_instance_empty_union, |
| 4840 | type_decl_instance_union, |
| 4819 | 4841 | decl_instance_empty_packed_union, |
| 4820 | 4842 | decl_instance_packed_union, |
| 4843 | type_decl_instance_empty_packed_union, |
| 4844 | type_decl_instance_packed_union, |
| 4821 | 4845 | decl_instance_type, |
| 4822 | 4846 | decl_instance_const, |
| 4823 | 4847 | decl_instance_const_fully_runtime, |
| ... | ... | @@ -4926,29 +4950,31 @@ pub const AbbrevCode = enum { |
| 4926 | 4950 | DeclValEnum(DW.AT), |
| 4927 | 4951 | DeclValEnum(DW.FORM), |
| 4928 | 4952 | }; |
| 4929 | | const decl_attrs = &[_]Attr{ |
| 4953 | const common_decl_attrs = &[_]Attr{ |
| 4930 | 4954 | .{ .ZIG_parent, .ref_addr }, |
| 4931 | 4955 | .{ .decl_line, .data4 }, |
| 4932 | 4956 | .{ .decl_column, .udata }, |
| 4957 | }; |
| 4958 | const decl_attrs = common_decl_attrs ++ .{ |
| 4933 | 4959 | .{ .accessibility, .data1 }, |
| 4934 | 4960 | .{ .name, .strx }, |
| 4935 | 4961 | }; |
| 4936 | | const type_decl_attrs = &[_]Attr{ |
| 4937 | | .{ .ZIG_parent, .ref_addr }, |
| 4938 | | .{ .decl_line, .data4 }, |
| 4939 | | .{ .decl_column, .udata }, |
| 4962 | const type_decl_attrs = common_decl_attrs ++ .{ |
| 4940 | 4963 | .{ .name, .strx }, |
| 4941 | 4964 | }; |
| 4942 | 4965 | const decl_specification_attrs = decl_attrs ++ &[_]Attr{ |
| 4943 | 4966 | .{ .declaration, .flag_present }, |
| 4944 | 4967 | }; |
| 4945 | | const type_decl_specification_attrs = type_decl_attrs ++ &[_]Attr{ |
| 4968 | const type_decl_specification_attrs = common_decl_attrs ++ &[_]Attr{ |
| 4946 | 4969 | .{ .declaration, .flag_present }, |
| 4947 | 4970 | }; |
| 4948 | 4971 | const decl_instance_attrs = &[_]Attr{ |
| 4949 | 4972 | .{ .ZIG_parent, .ref_addr }, |
| 4950 | 4973 | .{ .specification, .ref_addr }, |
| 4951 | 4974 | }; |
| 4975 | const type_decl_instance_attrs = decl_instance_attrs ++ .{ |
| 4976 | .{ .name, .strx }, |
| 4977 | }; |
| 4952 | 4978 | |
| 4953 | 4979 | const abbrevs = std.EnumArray(AbbrevCode, struct { |
| 4954 | 4980 | tag: DeclValEnum(DW.TAG), |
| ... | ... | @@ -5367,6 +5393,19 @@ pub const AbbrevCode = enum { |
| 5367 | 5393 | .{ .type, .ref_addr }, |
| 5368 | 5394 | }, |
| 5369 | 5395 | }, |
| 5396 | .type_decl_instance_empty_enum = .{ |
| 5397 | .tag = .enumeration_type, |
| 5398 | .attrs = type_decl_instance_attrs ++ .{ |
| 5399 | .{ .type, .ref_addr }, |
| 5400 | }, |
| 5401 | }, |
| 5402 | .type_decl_instance_enum = .{ |
| 5403 | .tag = .enumeration_type, |
| 5404 | .children = true, |
| 5405 | .attrs = type_decl_instance_attrs ++ .{ |
| 5406 | .{ .type, .ref_addr }, |
| 5407 | }, |
| 5408 | }, |
| 5370 | 5409 | .decl_instance_empty_incomplete_struct = .{ |
| 5371 | 5410 | .tag = .structure_type, |
| 5372 | 5411 | .attrs = decl_instance_attrs, |
| ... | ... | @@ -5391,6 +5430,21 @@ pub const AbbrevCode = enum { |
| 5391 | 5430 | .{ .alignment, .udata }, |
| 5392 | 5431 | }, |
| 5393 | 5432 | }, |
| 5433 | .type_decl_instance_empty_struct = .{ |
| 5434 | .tag = .structure_type, |
| 5435 | .attrs = type_decl_instance_attrs ++ .{ |
| 5436 | .{ .byte_size, .udata }, |
| 5437 | .{ .alignment, .udata }, |
| 5438 | }, |
| 5439 | }, |
| 5440 | .type_decl_instance_struct = .{ |
| 5441 | .tag = .structure_type, |
| 5442 | .children = true, |
| 5443 | .attrs = type_decl_instance_attrs ++ .{ |
| 5444 | .{ .byte_size, .udata }, |
| 5445 | .{ .alignment, .udata }, |
| 5446 | }, |
| 5447 | }, |
| 5394 | 5448 | .decl_instance_empty_packed_struct = .{ |
| 5395 | 5449 | .tag = .structure_type, |
| 5396 | 5450 | .attrs = decl_instance_attrs ++ .{ |
| ... | ... | @@ -5404,6 +5458,19 @@ pub const AbbrevCode = enum { |
| 5404 | 5458 | .{ .type, .ref_addr }, |
| 5405 | 5459 | }, |
| 5406 | 5460 | }, |
| 5461 | .type_decl_instance_empty_packed_struct = .{ |
| 5462 | .tag = .structure_type, |
| 5463 | .attrs = type_decl_instance_attrs ++ .{ |
| 5464 | .{ .type, .ref_addr }, |
| 5465 | }, |
| 5466 | }, |
| 5467 | .type_decl_instance_packed_struct = .{ |
| 5468 | .tag = .structure_type, |
| 5469 | .children = true, |
| 5470 | .attrs = type_decl_instance_attrs ++ .{ |
| 5471 | .{ .type, .ref_addr }, |
| 5472 | }, |
| 5473 | }, |
| 5407 | 5474 | .decl_instance_empty_incomplete_union = .{ |
| 5408 | 5475 | .tag = .union_type, |
| 5409 | 5476 | .attrs = decl_instance_attrs, |
| ... | ... | @@ -5428,6 +5495,21 @@ pub const AbbrevCode = enum { |
| 5428 | 5495 | .{ .alignment, .udata }, |
| 5429 | 5496 | }, |
| 5430 | 5497 | }, |
| 5498 | .type_decl_instance_empty_union = .{ |
| 5499 | .tag = .union_type, |
| 5500 | .attrs = type_decl_instance_attrs ++ .{ |
| 5501 | .{ .byte_size, .udata }, |
| 5502 | .{ .alignment, .udata }, |
| 5503 | }, |
| 5504 | }, |
| 5505 | .type_decl_instance_union = .{ |
| 5506 | .tag = .union_type, |
| 5507 | .children = true, |
| 5508 | .attrs = type_decl_instance_attrs ++ .{ |
| 5509 | .{ .byte_size, .udata }, |
| 5510 | .{ .alignment, .udata }, |
| 5511 | }, |
| 5512 | }, |
| 5431 | 5513 | .decl_instance_empty_packed_union = .{ |
| 5432 | 5514 | .tag = .union_type, |
| 5433 | 5515 | .attrs = decl_instance_attrs ++ .{ |
| ... | ... | @@ -5441,6 +5523,19 @@ pub const AbbrevCode = enum { |
| 5441 | 5523 | .{ .type, .ref_addr }, |
| 5442 | 5524 | }, |
| 5443 | 5525 | }, |
| 5526 | .type_decl_instance_empty_packed_union = .{ |
| 5527 | .tag = .union_type, |
| 5528 | .attrs = type_decl_instance_attrs ++ .{ |
| 5529 | .{ .type, .ref_addr }, |
| 5530 | }, |
| 5531 | }, |
| 5532 | .type_decl_instance_packed_union = .{ |
| 5533 | .tag = .union_type, |
| 5534 | .children = true, |
| 5535 | .attrs = type_decl_instance_attrs ++ .{ |
| 5536 | .{ .type, .ref_addr }, |
| 5537 | }, |
| 5538 | }, |
| 5444 | 5539 | .decl_instance_type = .{ |
| 5445 | 5540 | .tag = .imported_declaration, |
| 5446 | 5541 | .attrs = decl_instance_attrs ++ .{ |