authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2026-09-06 16:05:38-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2026-09-07 16:11:00-04:00
logefa11ce196bc1c60b34b41ab8b14be23825b45dc
tree4f9ef6288c9d3d9750d2f9f9cb12a5bbae799f22
parent4582acf585911b4391b909e5bbe7dd635801477b

Dwarf2: implement generic decls


3 files changed, 142 insertions(+), 156 deletions(-)

src/link/Dwarf2.zig+136-154
......@@ -1395,8 +1395,7 @@ pub fn getConst(dwarf: *Dwarf, pt: Zcu.PerThread, val: Value) link.Error!link.Co
13951395
13961396pub fn getGlobal(dwarf: *Dwarf, nav: InternPool.Nav.Index) link.Error!Global.Index {
13971397 const comp = dwarf.lf.comp;
1398 const gpa = comp.gpa;
1399 const global_gop = try dwarf.globals.getOrPut(gpa, nav);
1398 const global_gop = try dwarf.globals.getOrPut(comp.gpa, nav);
14001399 if (!global_gop.found_existing) global_gop.value_ptr.* = .{
14011400 .debug_info_ni = .none,
14021401 };
......@@ -1405,15 +1404,15 @@ pub fn getGlobal(dwarf: *Dwarf, nav: InternPool.Nav.Index) link.Error!Global.Ind
14051404 const mod = comp.zcu.?.navFileScope(nav).mod.?;
14061405 assert(!mod.strip);
14071406 if (dwarf.lf.cast(.elf2)) |elf| {
1408 try elf.nodes.ensureUnusedCapacity(gpa, 1);
1409 try elf.dwarf_globals.append(gpa, .{
1407 try elf.nodes.ensureUnusedCapacity(comp.gpa, 1);
1408 try elf.dwarf_globals.append(comp.gpa, .{
14101409 .debug_info_first_target_reloc = .none,
14111410 .debug_info_first_node_reloc = .none,
14121411 .debug_info_first_symbol_reloc = .none,
14131412 });
14141413 const unit = dwarf.getUnit(mod).get(dwarf);
14151414 global_gop.value_ptr.debug_info_ni = .wrap(elf.addNodeAssumeCapacity(
1416 unit.debug_info_ni.unwrap().?.addFloatingChild(gpa, &elf.mf, .{
1415 unit.debug_info_ni.unwrap().?.addFloatingChild(comp.gpa, &elf.mf, .{
14171416 .enable_next_moved = true,
14181417 }) catch |err| switch (err) {
14191418 else => |e| return e,
......@@ -1983,7 +1982,7 @@ pub fn updateComptimeGlobal(
19831982 .unnamed_test, .@"test", .decltest => return,
19841983 .@"comptime", .@"const", .@"var" => {},
19851984 }
1986 done: switch (ip.indexToKey(nav_val.toIntern())) {
1985 switch (ip.indexToKey(nav_val.toIntern())) {
19871986 .int_type,
19881987 .ptr_type,
19891988 .array_type,
......@@ -1997,35 +1996,6 @@ pub fn updateComptimeGlobal(
19971996 .error_set_type,
19981997 .inferred_error_set_type,
19991998 .spirv_type,
2000 => try dwarf.genDeclType(pt, global, &decl),
2001 .struct_type => {
2002 const loaded_struct = ip.loadStructType(nav_val.toIntern());
2003 if (global.toOptional() == loaded_struct.name_nav)
2004 _ = try dwarf.const_pool.get(pt, dwarf.constPoolUser(), nav_val.toIntern())
2005 else
2006 try dwarf.genDeclType(pt, global, &decl);
2007 },
2008 .enum_type => {
2009 const loaded_enum = ip.loadEnumType(nav_val.toIntern());
2010 if (global.toOptional() == loaded_enum.name_nav)
2011 _ = try dwarf.const_pool.get(pt, dwarf.constPoolUser(), nav_val.toIntern())
2012 else
2013 try dwarf.genDeclType(pt, global, &decl);
2014 },
2015 .union_type => {
2016 const loaded_union = ip.loadUnionType(nav_val.toIntern());
2017 if (global.toOptional() == loaded_union.name_nav)
2018 _ = try dwarf.const_pool.get(pt, dwarf.constPoolUser(), nav_val.toIntern())
2019 else
2020 try dwarf.genDeclType(pt, global, &decl);
2021 },
2022 .opaque_type => {
2023 const loaded_opaque = ip.loadOpaqueType(nav_val.toIntern());
2024 if (global.toOptional() == loaded_opaque.name_nav)
2025 _ = try dwarf.const_pool.get(pt, dwarf.constPoolUser(), nav_val.toIntern())
2026 else
2027 try dwarf.genDeclType(pt, global, &decl);
2028 },
20291999 .undef,
20302000 .simple_value,
20312001 .int,
......@@ -2040,18 +2010,39 @@ pub fn updateComptimeGlobal(
20402010 .aggregate,
20412011 .un,
20422012 .bitpack,
2043 => try dwarf.genDeclGlobal(pt, global, &decl),
2013 => try dwarf.genGlobal(pt, global, &decl),
2014 .struct_type => {
2015 const loaded_struct = ip.loadStructType(nav_val.toIntern());
2016 if (global.toOptional() == loaded_struct.name_nav) {
2017 _ = try dwarf.const_pool.get(pt, dwarf.constPoolUser(), nav_val.toIntern());
2018 } else try dwarf.genGlobal(pt, global, &decl);
2019 },
2020 .enum_type => {
2021 const loaded_enum = ip.loadEnumType(nav_val.toIntern());
2022 if (global.toOptional() == loaded_enum.name_nav) {
2023 _ = try dwarf.const_pool.get(pt, dwarf.constPoolUser(), nav_val.toIntern());
2024 } else try dwarf.genGlobal(pt, global, &decl);
2025 },
2026 .union_type => {
2027 const loaded_union = ip.loadUnionType(nav_val.toIntern());
2028 if (global.toOptional() == loaded_union.name_nav) {
2029 _ = try dwarf.const_pool.get(pt, dwarf.constPoolUser(), nav_val.toIntern());
2030 } else try dwarf.genGlobal(pt, global, &decl);
2031 },
2032 .opaque_type => {
2033 const loaded_opaque = ip.loadOpaqueType(nav_val.toIntern());
2034 if (global.toOptional() == loaded_opaque.name_nav) {
2035 _ = try dwarf.const_pool.get(pt, dwarf.constPoolUser(), nav_val.toIntern());
2036 } else try dwarf.genGlobal(pt, global, &decl);
2037 },
20442038 .@"extern" => unreachable,
20452039 .func => |func| if (func.owner_nav == global and func.generic_owner == .none) {
20462040 _ = try dwarf.const_pool.get(pt, dwarf.constPoolUser(), nav_val.toIntern());
2047 break :done;
20482041 } else return,
2049 // memoization, not values
2050 .memoized_call => unreachable,
2042 .memoized_call => unreachable, // not a value
20512043 }
20522044}
2053
2054fn genDeclType(
2045fn genGlobal(
20552046 dwarf: *Dwarf,
20562047 pt: Zcu.PerThread,
20572048 global: InternPool.Nav.Index,
......@@ -2065,12 +2056,12 @@ fn genDeclType(
20652056 elf.resetNodeRelocs(debug_info_ni);
20662057 } else unreachable;
20672058 defer di_nw.deinit();
2068 dwarf.genDeclTypeInner(pt, &di_nw, global, decl) catch |err| switch (err) {
2059 dwarf.genGlobalInner(pt, &di_nw, global, decl) catch |err| switch (err) {
20692060 error.WriteFailed => return dwarf.reportWriteError(&di_nw),
20702061 else => |e| return e,
20712062 };
20722063}
2073fn genDeclTypeInner(
2064fn genGlobalInner(
20742065 dwarf: *Dwarf,
20752066 pt: Zcu.PerThread,
20762067 di_nw: *link.MappedFile.Node.Writer,
......@@ -2080,94 +2071,70 @@ fn genDeclTypeInner(
20802071 const zcu = pt.zcu;
20812072 const ip = &zcu.intern_pool;
20822073 const nav = ip.getNav(global);
2074 const nav_const, const nav_ty: Type, const nav_align, const nav_val: Value = nav_resolved: {
2075 const nav_resolved = nav.resolved.?;
2076 break :nav_resolved .{
2077 nav_resolved.@"const",
2078 .fromInterned(nav_resolved.type),
2079 nav_resolved.@"align",
2080 .fromInterned(nav_resolved.value),
2081 };
2082 };
2083 const nav_class = nav_ty.classify(zcu);
20832084 const parent_ty = ip.namespacePtr(nav.analysis.?.namespace).owner_type;
20842085 const di_w = &di_nw.interface;
20852086 if (Type.fromInterned(parent_ty).getCaptures(zcu).len > 0) {
2086 try dwarf.abbrevCode(di_nw, .decl_instance_type);
2087 try dwarf.abbrevCode(di_nw, switch (nav_ty.toIntern()) {
2088 .type_type => .decl_instance_type,
2089 else => if (nav_const) switch (nav_class) {
2090 .no_possible_value, .one_possible_value => .decl_instance_const,
2091 .runtime => .decl_instance_const_fully_runtime,
2092 .partially_comptime => .decl_instance_const_partially_comptime,
2093 .fully_comptime => .decl_instance_const_fully_comptime,
2094 } else .decl_instance_var,
2095 });
20872096 try dwarf.refType(pt, di_nw, .fromInterned(parent_ty));
20882097 try dwarf.secOffset(di_nw, try dwarf.getGlobalDecl(pt, global), 0);
20892098 } else {
20902099 const parent_ni = try dwarf.getConstDecl(pt, parent_ty);
2091 try dwarf.abbrevCode(di_nw, .decl_type);
2100 try dwarf.abbrevCode(di_nw, switch (nav_ty.toIntern()) {
2101 .type_type => .decl_type,
2102 else => if (nav_const) switch (nav_class) {
2103 .no_possible_value, .one_possible_value => .decl_const,
2104 .runtime => .decl_const_fully_runtime,
2105 .partially_comptime => .decl_const_partially_comptime,
2106 .fully_comptime => .decl_const_fully_comptime,
2107 } else .decl_var,
2108 });
20922109 try dwarf.secOffset(di_nw, parent_ni, 0);
20932110 try di_w.writeInt(u32, decl.src_line + 1, dwarf.endian);
20942111 try di_w.writeUleb128(decl.src_column + 1);
20952112 try di_w.writeByte(if (decl.is_pub) DW.ACCESS.public else DW.ACCESS.private);
20962113 try dwarf.strp(&dwarf.debug_str, di_nw, nav.name.toSlice(ip));
20972114 }
2098 try dwarf.refConst(pt, di_nw, .fromInterned(nav.resolved.?.value));
2099 try dwarf.genDebugInfoPadding(di_w, di_w.unusedCapacityLen());
2100}
2101
2102fn genDeclGlobal(
2103 dwarf: *Dwarf,
2104 pt: Zcu.PerThread,
2105 global: InternPool.Nav.Index,
2106 decl: *const std.zig.Zir.Inst.Declaration.Unwrapped,
2107) link.Error!void {
2108 const gi = try dwarf.getGlobal(global);
2109 const debug_info_ni = gi.get(dwarf).debug_info_ni.unwrap().?;
2110 var di_nw: link.MappedFile.Node.Writer = undefined;
2111 if (dwarf.lf.cast(.elf2)) |elf| {
2112 debug_info_ni.writer(pt.zcu.gpa, &elf.mf, &di_nw);
2113 elf.resetNodeRelocs(debug_info_ni);
2114 } else unreachable;
2115 defer di_nw.deinit();
2116 dwarf.genDeclGlobalInner(pt, &di_nw, global, decl) catch |err| switch (err) {
2117 error.WriteFailed => return dwarf.reportWriteError(&di_nw),
2118 else => |e| return e,
2119 };
2120}
2121fn genDeclGlobalInner(
2122 dwarf: *Dwarf,
2123 pt: Zcu.PerThread,
2124 di_nw: *link.MappedFile.Node.Writer,
2125 global: InternPool.Nav.Index,
2126 decl: *const std.zig.Zir.Inst.Declaration.Unwrapped,
2127) link.EmitError!void {
2128 const zcu = pt.zcu;
2129 const ip = &zcu.intern_pool;
2130 const nav = ip.getNav(global);
2131 const nav_const, const nav_ty: Type, const nav_align, const nav_val: Value = resolved: {
2132 const resolved = nav.resolved.?;
2133 break :resolved .{
2134 resolved.@"const",
2135 .fromInterned(resolved.type),
2136 resolved.@"align",
2137 .fromInterned(resolved.value),
2138 };
2139 };
2140 const nav_class = nav_ty.classify(zcu);
2141 const parent_ni = try dwarf.getConstDecl(pt, ip.namespacePtr(nav.analysis.?.namespace).owner_type);
2142 const di_w = &di_nw.interface;
2143 try dwarf.abbrevCode(di_nw, if (nav_const) switch (nav_class) {
2144 .no_possible_value, .one_possible_value => .decl_const,
2145 .runtime => .decl_const_fully_runtime,
2146 .partially_comptime => .decl_const_partially_comptime,
2147 .fully_comptime => .decl_const_fully_comptime,
2148 } else .decl_var);
2149 try dwarf.secOffset(di_nw, parent_ni, 0);
2150 try di_w.writeInt(u32, decl.src_line + 1, dwarf.endian);
2151 try di_w.writeUleb128(decl.src_column + 1);
2152 try di_w.writeByte(if (decl.is_pub) DW.ACCESS.public else DW.ACCESS.private);
2153 try dwarf.strp(&dwarf.debug_str, di_nw, nav.name.toSlice(ip));
2154 try dwarf.strp(&dwarf.debug_str, di_nw, switch (decl.linkage) {
2155 .normal => nav.fqn,
2156 .@"extern", .@"export" => nav.name,
2157 }.toSlice(ip));
2158 const type_offset = di_w.end;
2159 if (nav_const) try dwarf.secOffsetPlaceholder(di_w) else {
2160 try dwarf.refType(pt, di_nw, nav_ty);
2161 try dwarf.blockConst(pt, di_nw, nav_val);
2162 }
2163 try di_w.writeUleb128(nav_align.toByteUnits() orelse nav_ty.abiAlignment(zcu).toByteUnits().?);
2164 try di_w.writeByte(@intFromBool(decl.linkage != .normal));
2165 if (nav_const) {
2166 if (nav_class.hasRuntimeBits()) try dwarf.blockConst(pt, di_nw, nav_val);
2167 if (nav_class.comptimeOnly()) try dwarf.refConst(pt, di_nw, nav_val);
2168 try dwarf.secOffsetFinish(di_nw, type_offset, di_nw.ni, di_w.end);
2169 try dwarf.abbrevCode(di_nw, .is_const);
2170 try dwarf.refType(pt, di_nw, nav_ty);
2115 switch (nav_ty.toIntern()) {
2116 .type_type => try dwarf.refConst(pt, di_nw, nav_val),
2117 else => {
2118 try dwarf.strp(&dwarf.debug_str, di_nw, switch (decl.linkage) {
2119 .normal => nav.fqn,
2120 .@"extern", .@"export" => nav.name,
2121 }.toSlice(ip));
2122 const type_offset = di_w.end;
2123 if (nav_const) try dwarf.secOffsetPlaceholder(di_w) else {
2124 try dwarf.refType(pt, di_nw, nav_ty);
2125 try dwarf.blockConst(pt, di_nw, nav_val);
2126 }
2127 try di_w.writeUleb128(nav_align.toByteUnits() orelse
2128 nav_ty.abiAlignment(zcu).toByteUnits().?);
2129 try di_w.writeByte(@intFromBool(decl.linkage != .normal));
2130 if (nav_const) {
2131 if (nav_class.hasRuntimeBits()) try dwarf.blockConst(pt, di_nw, nav_val);
2132 if (nav_class.comptimeOnly()) try dwarf.refConst(pt, di_nw, nav_val);
2133 try dwarf.secOffsetFinish(di_nw, type_offset, di_nw.ni, di_w.end);
2134 try dwarf.abbrevCode(di_nw, .is_const);
2135 try dwarf.refType(pt, di_nw, nav_ty);
2136 }
2137 },
21712138 }
21722139 try dwarf.genDebugInfoPadding(di_w, di_w.unusedCapacityLen());
21732140}
......@@ -2617,6 +2584,9 @@ fn updateConstInner(
26172584 .auto, .@"extern" => .decl_instance_empty_struct,
26182585 .@"packed" => .decl_instance_empty_packed_struct,
26192586 });
2587 try dwarf.refType(pt, di_nw, .fromInterned(ip.namespacePtr(
2588 ip.namespacePtr(loaded_struct.namespace).parent.unwrap().?,
2589 ).owner_type));
26202590 try dwarf.secOffset(di_nw, try dwarf.getConstDecl(pt, val), 0);
26212591 } else if (loaded_struct.name_nav.unwrap()) |name_ni| {
26222592 const name_nav = ip.getNav(name_ni);
......@@ -2750,6 +2720,9 @@ fn updateConstInner(
27502720 .auto, .@"extern" => .decl_instance_empty_union,
27512721 .@"packed" => .decl_instance_empty_packed_union,
27522722 });
2723 try dwarf.refType(pt, di_nw, .fromInterned(ip.namespacePtr(
2724 ip.namespacePtr(loaded_union.namespace).parent.unwrap().?,
2725 ).owner_type));
27532726 try dwarf.secOffset(di_nw, try dwarf.getConstDecl(pt, val), 0);
27542727 } else if (loaded_union.name_nav.unwrap()) |name_ni| {
27552728 const name_nav = ip.getNav(name_ni);
......@@ -2883,6 +2856,9 @@ fn updateConstInner(
28832856 .decl_instance_enum
28842857 else
28852858 .decl_instance_empty_enum);
2859 try dwarf.refType(pt, di_nw, .fromInterned(ip.namespacePtr(
2860 ip.namespacePtr(loaded_enum.namespace).parent.unwrap().?,
2861 ).owner_type));
28862862 try dwarf.secOffset(di_nw, try dwarf.getConstDecl(pt, val), 0);
28872863 } else if (loaded_enum.name_nav.unwrap()) |name_ni| {
28882864 const name_nav = ip.getNav(name_ni);
......@@ -3297,6 +3273,9 @@ fn updateConstIncompleteInner(
32973273 .@"union" => .decl_instance_empty_incomplete_union,
32983274 .@"enum" => .decl_instance_empty_incomplete_enum,
32993275 });
3276 try dwarf.refType(pt, di_nw, .fromInterned(ip.namespacePtr(
3277 ip.namespacePtr(namespace).parent.unwrap().?,
3278 ).owner_type));
33003279 try dwarf.secOffset(di_nw, try dwarf.getConstDecl(pt, val), 0);
33013280 } else if (maybe_name_nav.unwrap()) |name_ni| {
33023281 const name_nav = ip.getNav(name_ni);
......@@ -3625,15 +3604,19 @@ fn genDeclInner(
36253604 },
36263605 .global => |global| {
36273606 const nav = ip.getNav(global);
3607 const nav_const, const nav_ty = nav_resolved: {
3608 const nav_resolved = nav.resolved.?;
3609 break :nav_resolved .{ nav_resolved.@"const", nav_resolved.type };
3610 };
36283611 const src_inst = nav.srcInst(ip).resolveFull(ip).?;
36293612 const decl = zcu.fileByIndex(src_inst.file).zir.?.getDeclaration(src_inst.inst);
36303613 const parent_ni = try dwarf.getConstDecl(pt, ip.namespacePtr(
36313614 nav.analysis.?.namespace,
36323615 ).owner_type);
3633 try dwarf.abbrevCode(di_nw, if (nav.resolved.?.@"const") switch (nav.resolved.?.type) {
3616 try dwarf.abbrevCode(di_nw, switch (nav_ty) {
36343617 .type_type => .decl_specification_type,
3635 else => .decl_specification_const,
3636 } else .decl_specification_var);
3618 else => if (nav_const) .decl_specification_const else .decl_specification_var,
3619 });
36373620 try dwarf.secOffset(di_nw, parent_ni, 0);
36383621 try di_w.writeInt(u32, decl.src_line + 1, dwarf.endian);
36393622 try di_w.writeUleb128(decl.src_column + 1);
......@@ -4003,7 +3986,6 @@ pub const AbbrevCode = enum {
40033986 decl_specification_const,
40043987 decl_specification_var,
40053988 decl_specification_func,
4006 decl_instance_type,
40073989 decl_instance_empty_incomplete_enum,
40083990 decl_instance_incomplete_enum,
40093991 decl_instance_empty_enum,
......@@ -4020,11 +4002,12 @@ pub const AbbrevCode = enum {
40204002 decl_instance_union,
40214003 decl_instance_empty_packed_union,
40224004 decl_instance_packed_union,
4023 decl_instance_var,
4005 decl_instance_type,
40244006 decl_instance_const,
4025 decl_instance_const_runtime_bits,
4026 decl_instance_const_comptime_state,
4027 decl_instance_const_runtime_bits_comptime_state,
4007 decl_instance_const_fully_runtime,
4008 decl_instance_const_partially_comptime,
4009 decl_instance_const_fully_comptime,
4010 decl_instance_var,
40284011 decl_instance_empty_func,
40294012 decl_instance_func,
40304013 decl_instance_empty_func_generic,
......@@ -4149,6 +4132,7 @@ pub const AbbrevCode = enum {
41494132 .{ .declaration, .flag_present },
41504133 };
41514134 const decl_instance_attrs = &[_]Attr{
4135 .{ .ZIG_parent, .ref_addr },
41524136 .{ .specification, .ref_addr },
41534137 };
41544138
......@@ -4368,16 +4352,6 @@ pub const AbbrevCode = enum {
43684352 .{ .import, .ref_addr },
43694353 },
43704354 },
4371 .decl_var = .{
4372 .tag = .variable,
4373 .attrs = decl_attrs ++ .{
4374 .{ .linkage_name, .strp },
4375 .{ .type, .ref_addr },
4376 .{ .location, .exprloc },
4377 .{ .alignment, .udata },
4378 .{ .external, .flag },
4379 },
4380 },
43814355 .decl_const = .{
43824356 .tag = .constant,
43834357 .attrs = decl_attrs ++ .{
......@@ -4418,6 +4392,16 @@ pub const AbbrevCode = enum {
44184392 .{ .ZIG_comptime_value, .ref_addr },
44194393 },
44204394 },
4395 .decl_var = .{
4396 .tag = .variable,
4397 .attrs = decl_attrs ++ .{
4398 .{ .linkage_name, .strp },
4399 .{ .type, .ref_addr },
4400 .{ .location, .exprloc },
4401 .{ .alignment, .udata },
4402 .{ .external, .flag },
4403 },
4404 },
44214405 .decl_empty_func = .{
44224406 .tag = .subprogram,
44234407 .attrs = decl_attrs ++ .{
......@@ -4547,14 +4531,6 @@ pub const AbbrevCode = enum {
45474531 .tag = .subprogram,
45484532 .attrs = decl_specification_attrs,
45494533 },
4550 .decl_instance_type = .{
4551 .tag = .imported_declaration,
4552 .attrs = .{
4553 .{ .ZIG_parent, .ref_addr },
4554 } ++ decl_instance_attrs ++ .{
4555 .{ .import, .ref_addr },
4556 },
4557 },
45584534 .decl_instance_empty_incomplete_enum = .{
45594535 .tag = .enumeration_type,
45604536 .attrs = decl_instance_attrs,
......@@ -4651,26 +4627,32 @@ pub const AbbrevCode = enum {
46514627 .{ .type, .ref_addr },
46524628 },
46534629 },
4654 .decl_instance_var = .{
4655 .tag = .variable,
4630 .decl_instance_type = .{
4631 .tag = .imported_declaration,
4632 .attrs = decl_instance_attrs ++ .{
4633 .{ .import, .ref_addr },
4634 },
4635 },
4636 .decl_instance_const = .{
4637 .tag = .constant,
46564638 .attrs = decl_instance_attrs ++ .{
46574639 .{ .linkage_name, .strp },
46584640 .{ .type, .ref_addr },
4659 .{ .location, .exprloc },
46604641 .{ .alignment, .udata },
46614642 .{ .external, .flag },
46624643 },
46634644 },
4664 .decl_instance_const = .{
4645 .decl_instance_const_fully_runtime = .{
46654646 .tag = .constant,
46664647 .attrs = decl_instance_attrs ++ .{
46674648 .{ .linkage_name, .strp },
46684649 .{ .type, .ref_addr },
46694650 .{ .alignment, .udata },
46704651 .{ .external, .flag },
4652 .{ .const_value, .block },
46714653 },
46724654 },
4673 .decl_instance_const_runtime_bits = .{
4655 .decl_instance_const_partially_comptime = .{
46744656 .tag = .constant,
46754657 .attrs = decl_instance_attrs ++ .{
46764658 .{ .linkage_name, .strp },
......@@ -4678,9 +4660,10 @@ pub const AbbrevCode = enum {
46784660 .{ .alignment, .udata },
46794661 .{ .external, .flag },
46804662 .{ .const_value, .block },
4663 .{ .ZIG_comptime_value, .ref_addr },
46814664 },
46824665 },
4683 .decl_instance_const_comptime_state = .{
4666 .decl_instance_const_fully_comptime = .{
46844667 .tag = .constant,
46854668 .attrs = decl_instance_attrs ++ .{
46864669 .{ .linkage_name, .strp },
......@@ -4690,15 +4673,14 @@ pub const AbbrevCode = enum {
46904673 .{ .ZIG_comptime_value, .ref_addr },
46914674 },
46924675 },
4693 .decl_instance_const_runtime_bits_comptime_state = .{
4694 .tag = .constant,
4676 .decl_instance_var = .{
4677 .tag = .variable,
46954678 .attrs = decl_instance_attrs ++ .{
46964679 .{ .linkage_name, .strp },
46974680 .{ .type, .ref_addr },
4681 .{ .location, .exprloc },
46984682 .{ .alignment, .udata },
46994683 .{ .external, .flag },
4700 .{ .const_value, .block },
4701 .{ .ZIG_comptime_value, .ref_addr },
47024684 },
47034685 },
47044686 .decl_instance_empty_func = .{
src/link/Elf2.zig+5-1
......@@ -11041,7 +11041,11 @@ pub fn printNode(
1104111041 if (nav.resolved) |resolved| try w.print("{f}, ", .{
1104211042 Type.fromInterned(resolved.type).fmt(.{ .zcu = zcu, .tid = tid }),
1104311043 });
11044 try w.print("{f})", .{nav.fqn.fmt(ip)});
11044 try w.print("{f}", .{nav.fqn.fmt(ip)});
11045 if (nav.resolved) |resolved| try w.print(", {f}", .{
11046 Value.fromInterned(resolved.value).fmtValue(.{ .zcu = zcu, .tid = tid }),
11047 });
11048 try w.writeByte(')');
1104511049 },
1104611050 .func_frame_fde, .func_debug_info, .func_debug_line => |fi| {
1104711051 const zcu = elf.base.comp.zcu.?;
test/src/Debugger.zig+1-1
......@@ -2054,7 +2054,7 @@ pub fn addTests(db: *Debugger) void {
20542054 \\(lldb) breakpoint delete --force 1
20552055 \\1 breakpoints deleted; 0 breakpoint locations disabled.
20562056 },
2057 .{ .skip_new_linker = true },
2057 .{},
20582058 );
20592059 db.addLldbTest(
20602060 "multi_array_list",