| ... | ... | @@ -637,7 +637,7 @@ pub const WipNav = struct { |
| 637 | 637 | pub const Debug = struct { |
| 638 | 638 | wip_nav: WipNav, |
| 639 | 639 | pt: Zcu.PerThread, |
| 640 | | any_children: bool, |
| 640 | empty: bool, |
| 641 | 641 | blocks: std.ArrayList(struct { |
| 642 | 642 | abbrev_code: u32, |
| 643 | 643 | low_pc_off: usize, |
| ... | ... | @@ -763,14 +763,19 @@ pub const WipNav = struct { |
| 763 | 763 | } |
| 764 | 764 | fn finishDebugInfo(debug: *Debug, func_length: u64) link.EmitError!void { |
| 765 | 765 | const dwarf = debug.wip_nav.dwarf; |
| 766 | | const di_w = &debug.info_writer.interface; |
| 766 | const di_nw = &debug.info_writer; |
| 767 | const di_w = &di_nw.interface; |
| 767 | 768 | std.mem.writeInt( |
| 768 | 769 | u32, |
| 769 | 770 | di_w.buffered()[debug.info_func_length_offset..][0..4], |
| 770 | 771 | @intCast(func_length), |
| 771 | 772 | dwarf.endian, |
| 772 | 773 | ); |
| 773 | | try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 774 | if (debug.empty) std.leb.writeUnsignedFixed( |
| 775 | AbbrevCode.decl_size, |
| 776 | di_w.buffered()[0..AbbrevCode.decl_size], |
| 777 | @intCast(try dwarf.refAbbrevCode(di_nw.mf, .decl_empty_func)), |
| 778 | ) else try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 774 | 779 | try dwarf.genDebugInfoPadding(di_w, di_w.unusedCapacityLen()); |
| 775 | 780 | } |
| 776 | 781 | fn finishDebugLine(debug: *Debug) link.EmitError!void { |
| ... | ... | @@ -808,7 +813,7 @@ pub const WipNav = struct { |
| 808 | 813 | if (opt_name) |name| try dwarf.strp(&dwarf.debug_str, di_nw, name); |
| 809 | 814 | try dwarf.refType(debug.pt, di_nw, ty); |
| 810 | 815 | try dwarf.exprLoc(di_nw, loc); |
| 811 | | debug.any_children = true; |
| 816 | debug.empty = false; |
| 812 | 817 | } |
| 813 | 818 | |
| 814 | 819 | pub const LocalConstTag = enum { comptime_arg, local_const }; |
| ... | ... | @@ -862,7 +867,7 @@ pub const WipNav = struct { |
| 862 | 867 | try dwarf.refType(pt, di_nw, ty); |
| 863 | 868 | if (ty_class.hasRuntimeBits()) try dwarf.blockConst(pt, di_nw, val); |
| 864 | 869 | if (ty_class.comptimeOnly()) try dwarf.refConst(pt, di_nw, val); |
| 865 | | debug.any_children = true; |
| 870 | debug.empty = false; |
| 866 | 871 | } |
| 867 | 872 | |
| 868 | 873 | pub fn genVarArgsDebugInfo(debug: *Debug) link.Error!void { |
| ... | ... | @@ -874,7 +879,7 @@ pub const WipNav = struct { |
| 874 | 879 | fn genVarArgsDebugInfoInner(debug: *Debug) link.EmitError!void { |
| 875 | 880 | assert(debug.wip_nav.func != .none); |
| 876 | 881 | try debug.wip_nav.dwarf.abbrevCode(&debug.info_writer, .is_var_args); |
| 877 | | debug.any_children = true; |
| 882 | debug.empty = false; |
| 878 | 883 | } |
| 879 | 884 | |
| 880 | 885 | pub fn advanceLineAndPc( |
| ... | ... | @@ -993,7 +998,7 @@ pub const WipNav = struct { |
| 993 | 998 | try dwarf.addrSym(di_nw, debug.wip_nav.func_si, code_off); |
| 994 | 999 | block.high_pc = @intCast(di_w.end); |
| 995 | 1000 | try di_w.writeInt(u32, 0, dwarf.endian); |
| 996 | | debug.any_children = false; |
| 1001 | debug.empty = true; |
| 997 | 1002 | } |
| 998 | 1003 | |
| 999 | 1004 | pub fn leaveBlock(debug: *Debug, code_off: usize) link.Error!void { |
| ... | ... | @@ -1004,26 +1009,23 @@ pub const WipNav = struct { |
| 1004 | 1009 | } |
| 1005 | 1010 | fn leaveBlockInner(debug: *Debug, code_off: usize) link.EmitError!void { |
| 1006 | 1011 | const dwarf = debug.wip_nav.dwarf; |
| 1007 | | const block_size = comptime uleb128Size(@backingInt(AbbrevCode.block)); |
| 1008 | 1012 | const block = debug.blocks.pop().?; |
| 1009 | 1013 | |
| 1010 | 1014 | const di_nw = &debug.info_writer; |
| 1011 | 1015 | const di_w = &di_nw.interface; |
| 1012 | | if (debug.any_children) |
| 1013 | | try di_w.writeUleb128(@backingInt(AbbrevCode.null)) |
| 1014 | | else |
| 1015 | | std.leb.writeUnsignedFixed( |
| 1016 | | block_size, |
| 1017 | | di_w.buffered()[block.abbrev_code..][0..block_size], |
| 1018 | | @intCast(try dwarf.refAbbrevCode(di_nw.mf, .empty_block)), |
| 1019 | | ); |
| 1016 | const block_size = comptime uleb128Size(@backingInt(AbbrevCode.block)); |
| 1017 | if (debug.empty) std.leb.writeUnsignedFixed( |
| 1018 | block_size, |
| 1019 | di_w.buffered()[block.abbrev_code..][0..block_size], |
| 1020 | @intCast(try dwarf.refAbbrevCode(di_nw.mf, .empty_block)), |
| 1021 | ) else try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 1020 | 1022 | std.mem.writeInt( |
| 1021 | 1023 | u32, |
| 1022 | 1024 | di_nw.interface.buffered()[block.high_pc..][0..4], |
| 1023 | 1025 | @intCast(code_off - block.low_pc_off), |
| 1024 | 1026 | dwarf.endian, |
| 1025 | 1027 | ); |
| 1026 | | debug.any_children = true; |
| 1028 | debug.empty = false; |
| 1027 | 1029 | } |
| 1028 | 1030 | |
| 1029 | 1031 | pub fn enterInlineFunc( |
| ... | ... | @@ -1064,7 +1066,7 @@ pub const WipNav = struct { |
| 1064 | 1066 | block.high_pc = @intCast(di_w.end); |
| 1065 | 1067 | try di_w.writeInt(u32, 0, dwarf.endian); |
| 1066 | 1068 | try debug.setInlineFunc(func); |
| 1067 | | debug.any_children = false; |
| 1069 | debug.empty = true; |
| 1068 | 1070 | } |
| 1069 | 1071 | |
| 1070 | 1072 | pub fn leaveInlineFunc(debug: *Debug, func: InternPool.Index, code_off: usize) link.Error!void { |
| ... | ... | @@ -1079,19 +1081,16 @@ pub const WipNav = struct { |
| 1079 | 1081 | code_off: usize, |
| 1080 | 1082 | ) link.EmitError!void { |
| 1081 | 1083 | const dwarf = debug.wip_nav.dwarf; |
| 1082 | | const inlined_func_size = comptime uleb128Size(@backingInt(AbbrevCode.inlined_func)); |
| 1083 | 1084 | const block = debug.blocks.pop().?; |
| 1084 | 1085 | |
| 1085 | 1086 | const di_nw = &debug.info_writer; |
| 1086 | 1087 | const di_w = &di_nw.interface; |
| 1087 | | if (debug.any_children) |
| 1088 | | try di_w.writeUleb128(@backingInt(AbbrevCode.null)) |
| 1089 | | else |
| 1090 | | std.leb.writeUnsignedFixed( |
| 1091 | | inlined_func_size, |
| 1092 | | di_w.buffered()[block.abbrev_code..][0..inlined_func_size], |
| 1093 | | @intCast(try dwarf.refAbbrevCode(di_nw.mf, .empty_inlined_func)), |
| 1094 | | ); |
| 1088 | const inlined_func_size = comptime uleb128Size(@backingInt(AbbrevCode.inlined_func)); |
| 1089 | if (debug.empty) std.leb.writeUnsignedFixed( |
| 1090 | inlined_func_size, |
| 1091 | di_w.buffered()[block.abbrev_code..][0..inlined_func_size], |
| 1092 | @intCast(try dwarf.refAbbrevCode(di_nw.mf, .empty_inlined_func)), |
| 1093 | ) else try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 1095 | 1094 | std.mem.writeInt( |
| 1096 | 1095 | u32, |
| 1097 | 1096 | di_w.buffered()[block.high_pc..][0..4], |
| ... | ... | @@ -1099,7 +1098,7 @@ pub const WipNav = struct { |
| 1099 | 1098 | dwarf.endian, |
| 1100 | 1099 | ); |
| 1101 | 1100 | try debug.setInlineFunc(func); |
| 1102 | | debug.any_children = true; |
| 1101 | debug.empty = false; |
| 1103 | 1102 | } |
| 1104 | 1103 | |
| 1105 | 1104 | pub fn setInlineFunc(debug: *Debug, func: InternPool.Index) link.Error!void { |
| ... | ... | @@ -1398,25 +1397,26 @@ pub fn getGlobal(dwarf: *Dwarf, nav: InternPool.Nav.Index) link.Error!Global.Ind |
| 1398 | 1397 | if (global_gop.value_ptr.debug_info_ni != .none) return gi; |
| 1399 | 1398 | const mod = comp.zcu.?.navFileScope(nav).mod.?; |
| 1400 | 1399 | assert(!mod.strip); |
| 1401 | | const elf = dwarf.lf.cast(.elf2).?; |
| 1402 | | try elf.nodes.ensureUnusedCapacity(gpa, 1); |
| 1403 | | try elf.dwarf_globals.append(gpa, .{ |
| 1404 | | .debug_info_first_target_reloc = .none, |
| 1405 | | .debug_info_first_node_reloc = .none, |
| 1406 | | .debug_info_first_symbol_reloc = .none, |
| 1407 | | }); |
| 1408 | | const unit = dwarf.getUnit(mod).get(dwarf); |
| 1409 | | global_gop.value_ptr.debug_info_ni = .wrap(elf.addNodeAssumeCapacity( |
| 1410 | | unit.debug_info_ni.unwrap().?.addFloatingChild(gpa, &elf.mf, .{ |
| 1411 | | .enable_next_moved = true, |
| 1412 | | }) catch |err| switch (err) { |
| 1413 | | else => |e| return e, |
| 1414 | | error.MappedFileIo => return comp.link_diags.fail("failed to write output file: {t}", .{ |
| 1415 | | elf.mf.io_err.?, |
| 1416 | | }), |
| 1417 | | }, |
| 1418 | | .{ .global_debug_info = gi }, |
| 1419 | | )); |
| 1400 | if (dwarf.lf.cast(.elf2)) |elf| { |
| 1401 | try elf.nodes.ensureUnusedCapacity(gpa, 1); |
| 1402 | try elf.dwarf_globals.append(gpa, .{ |
| 1403 | .debug_info_first_target_reloc = .none, |
| 1404 | .debug_info_first_node_reloc = .none, |
| 1405 | .debug_info_first_symbol_reloc = .none, |
| 1406 | }); |
| 1407 | const unit = dwarf.getUnit(mod).get(dwarf); |
| 1408 | global_gop.value_ptr.debug_info_ni = .wrap(elf.addNodeAssumeCapacity( |
| 1409 | unit.debug_info_ni.unwrap().?.addFloatingChild(gpa, &elf.mf, .{ |
| 1410 | .enable_next_moved = true, |
| 1411 | }) catch |err| switch (err) { |
| 1412 | else => |e| return e, |
| 1413 | error.MappedFileIo => return comp.link_diags.fail("failed to write output file: {t}", .{ |
| 1414 | elf.mf.io_err.?, |
| 1415 | }), |
| 1416 | }, |
| 1417 | .{ .global_debug_info = gi }, |
| 1418 | )); |
| 1419 | } else unreachable; |
| 1420 | 1420 | return gi; |
| 1421 | 1421 | } |
| 1422 | 1422 | pub fn getGlobalIfExists(dwarf: *Dwarf, nav: InternPool.Nav.Index) ?Global.Index { |
| ... | ... | @@ -1436,30 +1436,31 @@ pub fn getFunc(dwarf: *Dwarf, nav: InternPool.Nav.Index) link.Error!Func.Index { |
| 1436 | 1436 | const fi: Func.Index = @fromBackingInt(@intCast(func_gop.index)); |
| 1437 | 1437 | if (func_gop.value_ptr.debug_info_ni != .none) return fi; |
| 1438 | 1438 | const mod = comp.zcu.?.navFileScope(nav).mod.?; |
| 1439 | | const elf = dwarf.lf.cast(.elf2).?; |
| 1440 | | try elf.nodes.ensureUnusedCapacity(gpa, 1); |
| 1441 | | try elf.dwarf_funcs.append(gpa, .{ |
| 1442 | | .frame_fde_first_symbol_reloc = .none, |
| 1443 | | .frame_fde_first_node_reloc = .none, |
| 1444 | | .debug_info_first_target_reloc = .none, |
| 1445 | | .debug_info_first_symbol_reloc = .none, |
| 1446 | | .debug_info_first_node_reloc = .none, |
| 1447 | | .debug_line_first_symbol_reloc = .none, |
| 1448 | | .debug_line_first_node_reloc = .none, |
| 1449 | | }); |
| 1450 | | if (mod.strip) return fi; |
| 1451 | | const unit = dwarf.getUnit(mod).get(dwarf); |
| 1452 | | func_gop.value_ptr.debug_info_ni = .wrap(elf.addNodeAssumeCapacity( |
| 1453 | | unit.debug_info_ni.unwrap().?.addFloatingChild(gpa, &elf.mf, .{ |
| 1454 | | .enable_next_moved = true, |
| 1455 | | }) catch |err| switch (err) { |
| 1456 | | else => |e| return e, |
| 1457 | | error.MappedFileIo => return comp.link_diags.fail("failed to write output file: {t}", .{ |
| 1458 | | elf.mf.io_err.?, |
| 1459 | | }), |
| 1460 | | }, |
| 1461 | | .{ .func_debug_info = fi }, |
| 1462 | | )); |
| 1439 | if (dwarf.lf.cast(.elf2)) |elf| { |
| 1440 | try elf.nodes.ensureUnusedCapacity(gpa, 1); |
| 1441 | try elf.dwarf_funcs.append(gpa, .{ |
| 1442 | .frame_fde_first_symbol_reloc = .none, |
| 1443 | .frame_fde_first_node_reloc = .none, |
| 1444 | .debug_info_first_target_reloc = .none, |
| 1445 | .debug_info_first_symbol_reloc = .none, |
| 1446 | .debug_info_first_node_reloc = .none, |
| 1447 | .debug_line_first_symbol_reloc = .none, |
| 1448 | .debug_line_first_node_reloc = .none, |
| 1449 | }); |
| 1450 | if (mod.strip) return fi; |
| 1451 | const unit = dwarf.getUnit(mod).get(dwarf); |
| 1452 | func_gop.value_ptr.debug_info_ni = .wrap(elf.addNodeAssumeCapacity( |
| 1453 | unit.debug_info_ni.unwrap().?.addFloatingChild(gpa, &elf.mf, .{ |
| 1454 | .enable_next_moved = true, |
| 1455 | }) catch |err| switch (err) { |
| 1456 | else => |e| return e, |
| 1457 | error.MappedFileIo => return comp.link_diags.fail("failed to write output file: {t}", .{ |
| 1458 | elf.mf.io_err.?, |
| 1459 | }), |
| 1460 | }, |
| 1461 | .{ .func_debug_info = fi }, |
| 1462 | )); |
| 1463 | } else unreachable; |
| 1463 | 1464 | return fi; |
| 1464 | 1465 | } |
| 1465 | 1466 | pub fn getFuncIfExists(dwarf: *Dwarf, nav: InternPool.Nav.Index) ?Func.Index { |
| ... | ... | @@ -1530,24 +1531,26 @@ pub fn getDecl( |
| 1530 | 1531 | const di: Decl.Index = @fromBackingInt(@intCast(decl_gop.index)); |
| 1531 | 1532 | if (decl_gop.value_ptr.debug_info_ni.unwrap()) |debug_info_ni| return debug_info_ni; |
| 1532 | 1533 | dwarf.pending_decl = .{ .di = di, .instance_val = instance_val }; |
| 1533 | | const elf = dwarf.lf.cast(.elf2).?; |
| 1534 | | try elf.nodes.ensureUnusedCapacity(gpa, 1); |
| 1535 | | try elf.dwarf_decls.putNoClobber(gpa, di, .{ |
| 1536 | | .debug_info_first_target_reloc = .none, |
| 1537 | | .debug_info_first_node_reloc = .none, |
| 1538 | | }); |
| 1539 | | const unit = dwarf.getUnit(zcu.fileByIndex(di.srcInst(dwarf).resolveFile(ip)).mod.?).get(dwarf); |
| 1540 | | const debug_info_ni = elf.addNodeAssumeCapacity( |
| 1541 | | unit.debug_info_ni.unwrap().?.addFloatingChild(gpa, &elf.mf, .{ |
| 1542 | | .enable_next_moved = true, |
| 1543 | | }) catch |err| switch (err) { |
| 1544 | | else => |e| return e, |
| 1545 | | error.MappedFileIo => return comp.link_diags.fail("failed to write output file: {t}", .{ |
| 1546 | | elf.mf.io_err.?, |
| 1547 | | }), |
| 1548 | | }, |
| 1549 | | .{ .decl_debug_info = di }, |
| 1550 | | ); |
| 1534 | const debug_info_ni = if (dwarf.lf.cast(.elf2)) |elf| debug_info_ni: { |
| 1535 | try elf.nodes.ensureUnusedCapacity(gpa, 1); |
| 1536 | try elf.dwarf_decls.putNoClobber(gpa, di, .{ |
| 1537 | .debug_info_first_target_reloc = .none, |
| 1538 | .debug_info_first_node_reloc = .none, |
| 1539 | }); |
| 1540 | const unit = dwarf.getUnit(zcu.fileByIndex(di.srcInst(dwarf).resolveFile(ip)).mod.?).get(dwarf); |
| 1541 | const debug_info_ni = elf.addNodeAssumeCapacity( |
| 1542 | unit.debug_info_ni.unwrap().?.addFloatingChild(gpa, &elf.mf, .{ |
| 1543 | .enable_next_moved = true, |
| 1544 | }) catch |err| switch (err) { |
| 1545 | else => |e| return e, |
| 1546 | error.MappedFileIo => return comp.link_diags.fail("failed to write output file: {t}", .{ |
| 1547 | elf.mf.io_err.?, |
| 1548 | }), |
| 1549 | }, |
| 1550 | .{ .decl_debug_info = di }, |
| 1551 | ); |
| 1552 | break :debug_info_ni debug_info_ni; |
| 1553 | } else unreachable; |
| 1551 | 1554 | decl_gop.value_ptr.debug_info_ni = .wrap(debug_info_ni); |
| 1552 | 1555 | return debug_info_ni; |
| 1553 | 1556 | } |
| ... | ... | @@ -2428,13 +2431,12 @@ fn updateConstInner( |
| 2428 | 2431 | }, |
| 2429 | 2432 | .struct_type => { |
| 2430 | 2433 | const loaded_struct = ip.loadStructType(val); |
| 2431 | | const zfi = loaded_struct.zir_index.resolveFile(ip); |
| 2432 | | const zf = zcu.fileByIndex(zfi); |
| 2433 | | const src_inst = loaded_struct.zir_index.resolve(ip); |
| 2434 | | if (src_inst == .main_struct_inst) { |
| 2434 | const src_inst = loaded_struct.zir_index.resolveFull(ip).?; |
| 2435 | const zf = zcu.fileByIndex(src_inst.file); |
| 2436 | if (src_inst.inst == .main_struct_inst) { |
| 2435 | 2437 | assert(loaded_struct.captures.len == 0); |
| 2436 | 2438 | const ui = dwarf.getUnit(zf.mod.?); |
| 2437 | | _, const fi = try ui.get(dwarf).getFile(zcu.gpa, ui, zfi); |
| 2439 | _, const fi = try ui.get(dwarf).getFile(zcu.gpa, ui, src_inst.file); |
| 2438 | 2440 | try dwarf.abbrevCode(di_nw, switch (loaded_struct.layout) { |
| 2439 | 2441 | .auto => if (loaded_struct.field_types.len > 0) .file else .empty_file, |
| 2440 | 2442 | .@"extern", .@"packed" => unreachable, |
| ... | ... | @@ -2472,7 +2474,7 @@ fn updateConstInner( |
| 2472 | 2474 | try di_w.writeByte(if (decl.is_pub) DW.ACCESS.public else DW.ACCESS.private); |
| 2473 | 2475 | try dwarf.strp(&dwarf.debug_str, di_nw, name_nav.name.toSlice(ip)); |
| 2474 | 2476 | } else { |
| 2475 | | const decl = zf.zir.?.getStructDecl(src_inst.?); |
| 2477 | const decl = zf.zir.?.getStructDecl(src_inst.inst); |
| 2476 | 2478 | const parent_ni = try dwarf.getDecl(pt, ip.namespacePtr( |
| 2477 | 2479 | ip.namespacePtr(loaded_struct.namespace).parent.unwrap().?, |
| 2478 | 2480 | ).owner_type); |
| ... | ... | @@ -2709,6 +2711,7 @@ fn updateConstInner( |
| 2709 | 2711 | .none => { |
| 2710 | 2712 | const zfi = loaded_enum.zir_index.unwrap().?.resolveFile(ip); |
| 2711 | 2713 | const zf = zcu.fileByIndex(zfi); |
| 2714 | const zir = &zf.zir.?; |
| 2712 | 2715 | if (loaded_enum.captures.len > 0 or loaded_enum.is_reified) { |
| 2713 | 2716 | try dwarf.abbrevCode(di_nw, if (loaded_enum.captures.len > 0 or |
| 2714 | 2717 | loaded_enum.field_names.len > 0) |
| ... | ... | @@ -2718,7 +2721,7 @@ fn updateConstInner( |
| 2718 | 2721 | try dwarf.secOffset(di_nw, try dwarf.getDecl(pt, val), 0); |
| 2719 | 2722 | } else if (loaded_enum.name_nav.unwrap()) |name_ni| { |
| 2720 | 2723 | const name_nav = ip.getNav(name_ni); |
| 2721 | | const decl = zf.zir.?.getDeclaration(name_nav.srcInst(ip).resolve(ip).?); |
| 2724 | const decl = zir.getDeclaration(name_nav.srcInst(ip).resolve(ip).?); |
| 2722 | 2725 | const parent_ni = try dwarf.getDecl(pt, ip.namespacePtr( |
| 2723 | 2726 | name_nav.analysis.?.namespace, |
| 2724 | 2727 | ).owner_type); |
| ... | ... | @@ -2732,8 +2735,7 @@ fn updateConstInner( |
| 2732 | 2735 | try di_w.writeByte(if (decl.is_pub) DW.ACCESS.public else DW.ACCESS.private); |
| 2733 | 2736 | try dwarf.strp(&dwarf.debug_str, di_nw, name_nav.name.toSlice(ip)); |
| 2734 | 2737 | } else { |
| 2735 | | const decl = |
| 2736 | | zf.zir.?.getEnumDecl(loaded_enum.zir_index.unwrap().?.resolve(ip).?); |
| 2738 | const decl = zir.getEnumDecl(loaded_enum.zir_index.unwrap().?.resolve(ip).?); |
| 2737 | 2739 | const parent_ni = try dwarf.getDecl(pt, ip.namespacePtr( |
| 2738 | 2740 | ip.namespacePtr(loaded_enum.namespace).parent.unwrap().?, |
| 2739 | 2741 | ).owner_type); |
| ... | ... | @@ -2756,6 +2758,7 @@ fn updateConstInner( |
| 2756 | 2758 | }, |
| 2757 | 2759 | } |
| 2758 | 2760 | try dwarf.refType(pt, di_nw, .fromInterned(loaded_enum.int_tag_type)); |
| 2761 | try dwarf.genCaptures(pt, di_nw, loaded_enum.captures); |
| 2759 | 2762 | for (0..loaded_enum.field_names.len) |field_index| { |
| 2760 | 2763 | try dwarf.abbrevCode(di_nw, .enum_field); |
| 2761 | 2764 | try dwarf.enumConstValue(di_w, loaded_enum, field_index); |
| ... | ... | @@ -2772,10 +2775,10 @@ fn updateConstInner( |
| 2772 | 2775 | .opaque_type => return dwarf.updateConstIncompleteInner(pt, di_nw, val), |
| 2773 | 2776 | .spirv_type => unreachable, |
| 2774 | 2777 | .func_type => |func_type| { |
| 2775 | | const is_nullary = func_type.param_types.len == 0 and !func_type.is_var_args; |
| 2778 | const is_empty = func_type.param_types.len == 0 and !func_type.is_var_args; |
| 2776 | 2779 | const name = try zcu.gpa.print("{f}", .{Type.fromInterned(val).fmt(pt)}); |
| 2777 | 2780 | defer zcu.gpa.free(name); |
| 2778 | | try dwarf.abbrevCode(di_nw, if (is_nullary) .nullary_func_type else .func_type); |
| 2781 | try dwarf.abbrevCode(di_nw, if (is_empty) .empty_func_type else .func_type); |
| 2779 | 2782 | try dwarf.strp(&dwarf.debug_str, di_nw, name); |
| 2780 | 2783 | const cc: DW.CC = cc: { |
| 2781 | 2784 | if (zcu.getTarget().cCallingConvention()) |cc| { |
| ... | ... | @@ -2848,16 +2851,14 @@ fn updateConstInner( |
| 2848 | 2851 | }; |
| 2849 | 2852 | try di_w.writeByte(@backingInt(cc)); |
| 2850 | 2853 | try dwarf.refType(pt, di_nw, .fromInterned(func_type.return_type)); |
| 2851 | | if (!is_nullary) { |
| 2852 | | for (0..func_type.param_types.len) |param_index| { |
| 2853 | | try dwarf.abbrevCode(di_nw, .unnamed_param); |
| 2854 | | try dwarf.refType(pt, di_nw, .fromInterned( |
| 2855 | | func_type.param_types.get(ip)[param_index], |
| 2856 | | )); |
| 2857 | | } |
| 2858 | | if (func_type.is_var_args) try dwarf.abbrevCode(di_nw, .is_var_args); |
| 2859 | | try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 2854 | for (0..func_type.param_types.len) |param_index| { |
| 2855 | try dwarf.abbrevCode(di_nw, .unnamed_param); |
| 2856 | try dwarf.refType(pt, di_nw, .fromInterned( |
| 2857 | func_type.param_types.get(ip)[param_index], |
| 2858 | )); |
| 2860 | 2859 | } |
| 2860 | if (func_type.is_var_args) try dwarf.abbrevCode(di_nw, .is_var_args); |
| 2861 | if (!is_empty) try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 2861 | 2862 | }, |
| 2862 | 2863 | .error_set_type => |error_set_type| { |
| 2863 | 2864 | const name = try zcu.gpa.print("{f}", .{Type.fromInterned(val).fmt(pt)}); |
| ... | ... | @@ -2897,37 +2898,36 @@ fn updateConstInner( |
| 2897 | 2898 | |
| 2898 | 2899 | else => return, |
| 2899 | 2900 | .func => |func| { |
| 2900 | | const fn_ty = ip.indexToKey(func.ty).func_type; |
| 2901 | const func_type = ip.indexToKey(func.ty).func_type; |
| 2901 | 2902 | const nav = ip.getNav(func.owner_nav); |
| 2902 | 2903 | const inst_info = nav.srcInst(ip).resolveFull(ip).?; |
| 2903 | 2904 | const zf = zcu.fileByIndex(inst_info.file); |
| 2904 | | const decl = zf.zir.?.getDeclaration(inst_info.inst); |
| 2905 | const zir = &zf.zir.?; |
| 2906 | const decl = zir.getDeclaration(inst_info.inst); |
| 2907 | const empty = func_type.param_types.len == 0 and !func_type.is_var_args; |
| 2905 | 2908 | const parent_ty: Type = .fromInterned(ip.namespacePtr(nav.analysis.?.namespace).owner_type); |
| 2906 | | try dwarf.abbrevCode(di_nw, .decl_func_generic); |
| 2909 | try dwarf.abbrevCode(di_nw, if (empty) .decl_empty_func_generic else .decl_func_generic); |
| 2907 | 2910 | try dwarf.refType(pt, di_nw, parent_ty); |
| 2908 | 2911 | try di_w.writeInt(u32, decl.src_line + 1, dwarf.endian); |
| 2909 | 2912 | try di_w.writeUleb128(decl.src_column + 1); |
| 2910 | 2913 | try di_w.writeByte(if (decl.is_pub) DW.ACCESS.public else DW.ACCESS.private); |
| 2911 | 2914 | try dwarf.strp(&dwarf.debug_str, di_nw, nav.name.toSlice(ip)); |
| 2912 | | try dwarf.refType(pt, di_nw, .fromInterned(fn_ty.return_type)); |
| 2913 | | var param_index: u32 = 0; |
| 2914 | | for (zf.zir.?.getParamBody(func.zir_body_inst.resolve(ip).?)) |param_inst| { |
| 2915 | | switch (zf.zir.?.getParamName(param_inst) orelse break) { |
| 2915 | try dwarf.refType(pt, di_nw, .fromInterned(func_type.return_type)); |
| 2916 | for ( |
| 2917 | zir.getParamBody(func.zir_body_inst.resolve(ip).?)[0..func_type.param_types.len], |
| 2918 | func_type.param_types.get(&zcu.intern_pool), |
| 2919 | ) |param_inst, param_ty| { |
| 2920 | switch (zir.getParamName(param_inst).?) { |
| 2916 | 2921 | .empty => try dwarf.abbrevCode(di_nw, .unnamed_param), |
| 2917 | 2922 | else => |param_name| { |
| 2918 | 2923 | try dwarf.abbrevCode(di_nw, .param); |
| 2919 | | try dwarf.strp(&dwarf.debug_str, di_nw, zf.zir.?.nullTerminatedString( |
| 2920 | | param_name, |
| 2921 | | )); |
| 2924 | try dwarf.strp(&dwarf.debug_str, di_nw, zir.nullTerminatedString(param_name)); |
| 2922 | 2925 | }, |
| 2923 | 2926 | } |
| 2924 | | try dwarf.refType(pt, di_nw, .fromInterned( |
| 2925 | | fn_ty.param_types.get(&zcu.intern_pool)[param_index], |
| 2926 | | )); |
| 2927 | | param_index += 1; |
| 2927 | try dwarf.refType(pt, di_nw, .fromInterned(param_ty)); |
| 2928 | 2928 | } |
| 2929 | | if (fn_ty.is_var_args) try dwarf.abbrevCode(di_nw, .is_var_args); |
| 2930 | | try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 2929 | if (func_type.is_var_args) try dwarf.abbrevCode(di_nw, .is_var_args); |
| 2930 | if (!empty) try di_w.writeUleb128(@backingInt(AbbrevCode.null)); |
| 2931 | 2931 | }, |
| 2932 | 2932 | |
| 2933 | 2933 | .memoized_call => unreachable, // not a value |
| ... | ... | @@ -2988,16 +2988,16 @@ fn updateConstIncompleteInner( |
| 2988 | 2988 | break :done; |
| 2989 | 2989 | }, |
| 2990 | 2990 | else => { |
| 2991 | | const data = |
| 2992 | | zf.zir.?.instructions.items(.data)[@backingInt(src_inst.inst)].extended; |
| 2991 | const zir = &zf.zir.?; |
| 2992 | const data = zir.instructions.items(.data)[@backingInt(src_inst.inst)].extended; |
| 2993 | 2993 | const src_line, const src_column = src_loc: switch (data.opcode) { |
| 2994 | 2994 | else => unreachable, |
| 2995 | 2995 | .struct_decl => { |
| 2996 | | const decl = zf.zir.?.getStructDecl(src_inst.inst); |
| 2996 | const decl = zir.getStructDecl(src_inst.inst); |
| 2997 | 2997 | break :src_loc .{ decl.src_line, decl.src_column }; |
| 2998 | 2998 | }, |
| 2999 | 2999 | .reify_struct => { |
| 3000 | | const decl = zf.zir.?.extraData( |
| 3000 | const decl = zir.extraData( |
| 3001 | 3001 | std.zig.Zir.Inst.ReifyStruct, |
| 3002 | 3002 | data.operand, |
| 3003 | 3003 | ).data; |
| ... | ... | @@ -3025,15 +3025,16 @@ fn updateConstIncompleteInner( |
| 3025 | 3025 | break :done; |
| 3026 | 3026 | }; |
| 3027 | 3027 | const zf = zcu.fileByIndex(src_inst.file); |
| 3028 | | const data = zf.zir.?.instructions.items(.data)[@backingInt(src_inst.inst)].extended; |
| 3028 | const zir = &zf.zir.?; |
| 3029 | const data = zir.instructions.items(.data)[@backingInt(src_inst.inst)].extended; |
| 3029 | 3030 | const src_line, const src_column = src_loc: switch (data.opcode) { |
| 3030 | 3031 | else => unreachable, |
| 3031 | 3032 | .union_decl => { |
| 3032 | | const decl = zf.zir.?.getUnionDecl(src_inst.inst); |
| 3033 | const decl = zir.getUnionDecl(src_inst.inst); |
| 3033 | 3034 | break :src_loc .{ decl.src_line, decl.src_column }; |
| 3034 | 3035 | }, |
| 3035 | 3036 | .reify_union => { |
| 3036 | | const decl = zf.zir.?.extraData(std.zig.Zir.Inst.ReifyUnion, data.operand).data; |
| 3037 | const decl = zir.extraData(std.zig.Zir.Inst.ReifyUnion, data.operand).data; |
| 3037 | 3038 | break :src_loc .{ decl.src_line, decl.src_column }; |
| 3038 | 3039 | }, |
| 3039 | 3040 | }; |
| ... | ... | @@ -3062,15 +3063,16 @@ fn updateConstIncompleteInner( |
| 3062 | 3063 | break :done; |
| 3063 | 3064 | }; |
| 3064 | 3065 | const zf = zcu.fileByIndex(src_inst.file); |
| 3065 | | const data = zf.zir.?.instructions.items(.data)[@backingInt(src_inst.inst)].extended; |
| 3066 | const zir = &zf.zir.?; |
| 3067 | const data = zir.instructions.items(.data)[@backingInt(src_inst.inst)].extended; |
| 3066 | 3068 | const src_line, const src_column = src_loc: switch (data.opcode) { |
| 3067 | 3069 | else => unreachable, |
| 3068 | 3070 | .enum_decl => { |
| 3069 | | const decl = zf.zir.?.getEnumDecl(src_inst.inst); |
| 3071 | const decl = zir.getEnumDecl(src_inst.inst); |
| 3070 | 3072 | break :src_loc .{ decl.src_line, decl.src_column }; |
| 3071 | 3073 | }, |
| 3072 | 3074 | .reify_enum => { |
| 3073 | | const decl = zf.zir.?.extraData(std.zig.Zir.Inst.ReifyEnum, data.operand).data; |
| 3075 | const decl = zir.extraData(std.zig.Zir.Inst.ReifyEnum, data.operand).data; |
| 3074 | 3076 | break :src_loc .{ decl.src_line, decl.src_column }; |
| 3075 | 3077 | }, |
| 3076 | 3078 | }; |
| ... | ... | @@ -3251,18 +3253,19 @@ fn genDeclInner( |
| 3251 | 3253 | break :done; |
| 3252 | 3254 | }; |
| 3253 | 3255 | const zf = zcu.fileByIndex(src_inst.file); |
| 3254 | | const inst = zf.zir.?.instructions.get(@backingInt(src_inst.inst)); |
| 3256 | const zir = &zf.zir.?; |
| 3257 | const inst = zir.instructions.get(@backingInt(src_inst.inst)); |
| 3255 | 3258 | const src_line, const src_column, const capture_names = decl: switch (inst.tag) { |
| 3256 | 3259 | else => unreachable, |
| 3257 | 3260 | .struct_init, .struct_init_ref => { |
| 3258 | | const decl = zf.zir.?.extraData( |
| 3261 | const decl = zir.extraData( |
| 3259 | 3262 | std.zig.Zir.Inst.StructInit, |
| 3260 | 3263 | inst.data.pl_node.payload_index, |
| 3261 | 3264 | ).data; |
| 3262 | 3265 | break :decl .{ decl.src_line, decl.src_column, &.{} }; |
| 3263 | 3266 | }, |
| 3264 | 3267 | .struct_init_anon => { |
| 3265 | | const decl = zf.zir.?.extraData( |
| 3268 | const decl = zir.extraData( |
| 3266 | 3269 | std.zig.Zir.Inst.StructInitAnon, |
| 3267 | 3270 | inst.data.pl_node.payload_index, |
| 3268 | 3271 | ).data; |
| ... | ... | @@ -3271,11 +3274,11 @@ fn genDeclInner( |
| 3271 | 3274 | .extended => switch (inst.data.extended.opcode) { |
| 3272 | 3275 | else => unreachable, |
| 3273 | 3276 | .struct_decl => { |
| 3274 | | const decl = zf.zir.?.getStructDecl(src_inst.inst); |
| 3277 | const decl = zir.getStructDecl(src_inst.inst); |
| 3275 | 3278 | break :decl .{ decl.src_line, decl.src_column, decl.capture_names }; |
| 3276 | 3279 | }, |
| 3277 | 3280 | .reify_struct => { |
| 3278 | | const decl = zf.zir.?.extraData( |
| 3281 | const decl = zir.extraData( |
| 3279 | 3282 | std.zig.Zir.Inst.ReifyStruct, |
| 3280 | 3283 | inst.data.extended.operand, |
| 3281 | 3284 | ).data; |
| ... | ... | @@ -3302,17 +3305,18 @@ fn genDeclInner( |
| 3302 | 3305 | break :done; |
| 3303 | 3306 | }; |
| 3304 | 3307 | const zf = zcu.fileByIndex(src_inst.file); |
| 3305 | | const inst = zf.zir.?.instructions.get(@backingInt(src_inst.inst)); |
| 3308 | const zir = &zf.zir.?; |
| 3309 | const inst = zir.instructions.get(@backingInt(src_inst.inst)); |
| 3306 | 3310 | const src_line, const src_column, const capture_names = decl: switch (inst.tag) { |
| 3307 | 3311 | else => unreachable, |
| 3308 | 3312 | .extended => switch (inst.data.extended.opcode) { |
| 3309 | 3313 | else => unreachable, |
| 3310 | 3314 | .union_decl => { |
| 3311 | | const decl = zf.zir.?.getUnionDecl(src_inst.inst); |
| 3315 | const decl = zir.getUnionDecl(src_inst.inst); |
| 3312 | 3316 | break :decl .{ decl.src_line, decl.src_column, decl.capture_names }; |
| 3313 | 3317 | }, |
| 3314 | 3318 | .reify_union => { |
| 3315 | | const decl = zf.zir.?.extraData( |
| 3319 | const decl = zir.extraData( |
| 3316 | 3320 | std.zig.Zir.Inst.ReifyUnion, |
| 3317 | 3321 | inst.data.extended.operand, |
| 3318 | 3322 | ).data; |
| ... | ... | @@ -3339,17 +3343,18 @@ fn genDeclInner( |
| 3339 | 3343 | break :done; |
| 3340 | 3344 | }; |
| 3341 | 3345 | const zf = zcu.fileByIndex(src_inst.file); |
| 3342 | | const inst = zf.zir.?.instructions.get(@backingInt(src_inst.inst)); |
| 3346 | const zir = &zf.zir.?; |
| 3347 | const inst = zir.instructions.get(@backingInt(src_inst.inst)); |
| 3343 | 3348 | const src_line, const src_column, const capture_names = decl: switch (inst.tag) { |
| 3344 | 3349 | else => unreachable, |
| 3345 | 3350 | .extended => switch (inst.data.extended.opcode) { |
| 3346 | 3351 | else => unreachable, |
| 3347 | 3352 | .enum_decl => { |
| 3348 | | const decl = zf.zir.?.getEnumDecl(src_inst.inst); |
| 3353 | const decl = zir.getEnumDecl(src_inst.inst); |
| 3349 | 3354 | break :decl .{ decl.src_line, decl.src_column, decl.capture_names }; |
| 3350 | 3355 | }, |
| 3351 | 3356 | .reify_enum => { |
| 3352 | | const decl = zf.zir.?.extraData( |
| 3357 | const decl = zir.extraData( |
| 3353 | 3358 | std.zig.Zir.Inst.ReifyEnum, |
| 3354 | 3359 | inst.data.extended.operand, |
| 3355 | 3360 | ).data; |
| ... | ... | @@ -3390,9 +3395,10 @@ fn genDeclInner( |
| 3390 | 3395 | }; |
| 3391 | 3396 | }, |
| 3392 | 3397 | }; |
| 3398 | const zir = &zf.zir.?; |
| 3393 | 3399 | if (maybe_name_nav.unwrap()) |name_ni| { |
| 3394 | 3400 | const name_nav = ip.getNav(name_ni); |
| 3395 | | const decl = zf.zir.?.getDeclaration(name_nav.srcInst(ip).resolve(ip).?); |
| 3401 | const decl = zir.getDeclaration(name_nav.srcInst(ip).resolve(ip).?); |
| 3396 | 3402 | const parent_ni = try dwarf.getDecl(pt, ip.namespacePtr( |
| 3397 | 3403 | name_nav.analysis.?.namespace, |
| 3398 | 3404 | ).owner_type); |
| ... | ... | @@ -3434,12 +3440,11 @@ fn genDeclInner( |
| 3434 | 3440 | .@"comptime", .runtime, .nav_val => try dwarf.strp( |
| 3435 | 3441 | &dwarf.debug_str, |
| 3436 | 3442 | di_nw, |
| 3437 | | zf.zir.?.nullTerminatedString(capture_name), |
| 3443 | zir.nullTerminatedString(capture_name), |
| 3438 | 3444 | ), |
| 3439 | 3445 | .nav_ref => { |
| 3440 | | const capture_name_slice = try zcu.gpa.print("&{s}", .{ |
| 3441 | | zf.zir.?.nullTerminatedString(capture_name), |
| 3442 | | }); |
| 3446 | const capture_name_slice = |
| 3447 | try zcu.gpa.print("&{s}", .{zir.nullTerminatedString(capture_name)}); |
| 3443 | 3448 | defer zcu.gpa.free(capture_name_slice); |
| 3444 | 3449 | try dwarf.strp(&dwarf.debug_str, di_nw, capture_name_slice); |
| 3445 | 3450 | }, |
| ... | ... | @@ -3585,13 +3590,9 @@ fn blockConst( |
| 3585 | 3590 | const size = ty.abiSize(pt.zcu); |
| 3586 | 3591 | try nw.interface.writeUleb128(size); |
| 3587 | 3592 | const start = nw.interface.end; |
| 3588 | | if (size > 0) try codegen.generateSymbol( |
| 3589 | | dwarf.lf, |
| 3590 | | pt, |
| 3591 | | val, |
| 3592 | | &nw.interface, |
| 3593 | | .{ .atom_index = @bitCast(nw.ni) }, |
| 3594 | | ); |
| 3593 | if (size > 0) try codegen.generateSymbol(dwarf.lf, pt, val, &nw.interface, .{ |
| 3594 | .atom_index = @bitCast(nw.ni), |
| 3595 | }); |
| 3595 | 3596 | assert(start + size == nw.interface.end); |
| 3596 | 3597 | } |
| 3597 | 3598 | |
| ... | ... | @@ -3782,11 +3783,11 @@ pub const AbbrevCode = enum { |
| 3782 | 3783 | decl_const_runtime_bits, |
| 3783 | 3784 | decl_const_comptime_state, |
| 3784 | 3785 | decl_const_runtime_bits_comptime_state, |
| 3785 | | decl_nullary_func, |
| 3786 | decl_empty_func, |
| 3786 | 3787 | decl_func, |
| 3787 | | decl_nullary_func_generic, |
| 3788 | decl_empty_func_generic, |
| 3788 | 3789 | decl_func_generic, |
| 3789 | | decl_extern_nullary_func, |
| 3790 | decl_extern_empty_func, |
| 3790 | 3791 | decl_extern_func, |
| 3791 | 3792 | decl_specification_empty_struct, |
| 3792 | 3793 | decl_specification_struct, |
| ... | ... | @@ -3823,11 +3824,11 @@ pub const AbbrevCode = enum { |
| 3823 | 3824 | decl_instance_const_runtime_bits, |
| 3824 | 3825 | decl_instance_const_comptime_state, |
| 3825 | 3826 | decl_instance_const_runtime_bits_comptime_state, |
| 3826 | | decl_instance_nullary_func, |
| 3827 | decl_instance_empty_func, |
| 3827 | 3828 | decl_instance_func, |
| 3828 | | decl_instance_nullary_func_generic, |
| 3829 | decl_instance_empty_func_generic, |
| 3829 | 3830 | decl_instance_func_generic, |
| 3830 | | decl_instance_extern_nullary_func, |
| 3831 | decl_instance_extern_empty_func, |
| 3831 | 3832 | decl_instance_extern_func, |
| 3832 | 3833 | // the rest are unrestricted other than empty variants must not be longer |
| 3833 | 3834 | // than the non-empty variant, and so should appear first |
| ... | ... | @@ -3865,7 +3866,7 @@ pub const AbbrevCode = enum { |
| 3865 | 3866 | vector_type, |
| 3866 | 3867 | array_index, |
| 3867 | 3868 | array_len, |
| 3868 | | nullary_func_type, |
| 3869 | empty_func_type, |
| 3869 | 3870 | func_type, |
| 3870 | 3871 | param, |
| 3871 | 3872 | unnamed_param, |
| ... | ... | @@ -3882,7 +3883,7 @@ pub const AbbrevCode = enum { |
| 3882 | 3883 | comptime_capture_fully_comptime, |
| 3883 | 3884 | runtime_capture, |
| 3884 | 3885 | nav_capture, |
| 3885 | | builtin_extern_nullary_func, |
| 3886 | builtin_extern_empty_func, |
| 3886 | 3887 | builtin_extern_func, |
| 3887 | 3888 | builtin_extern_var, |
| 3888 | 3889 | empty_block, |
| ... | ... | @@ -4216,7 +4217,7 @@ pub const AbbrevCode = enum { |
| 4216 | 4217 | .{ .ZIG_comptime_value, .ref_addr }, |
| 4217 | 4218 | }, |
| 4218 | 4219 | }, |
| 4219 | | .decl_nullary_func = .{ |
| 4220 | .decl_empty_func = .{ |
| 4220 | 4221 | .tag = .subprogram, |
| 4221 | 4222 | .attrs = decl_attrs ++ .{ |
| 4222 | 4223 | .{ .linkage_name, .strp }, |
| ... | ... | @@ -4241,11 +4242,10 @@ pub const AbbrevCode = enum { |
| 4241 | 4242 | .{ .noreturn, .flag }, |
| 4242 | 4243 | }, |
| 4243 | 4244 | }, |
| 4244 | | .decl_nullary_func_generic = .{ |
| 4245 | .decl_empty_func_generic = .{ |
| 4245 | 4246 | .tag = .subprogram, |
| 4246 | 4247 | .attrs = decl_attrs ++ .{ |
| 4247 | 4248 | .{ .type, .ref_addr }, |
| 4248 | | .{ .noreturn, .flag }, |
| 4249 | 4249 | }, |
| 4250 | 4250 | }, |
| 4251 | 4251 | .decl_func_generic = .{ |
| ... | ... | @@ -4255,7 +4255,7 @@ pub const AbbrevCode = enum { |
| 4255 | 4255 | .{ .type, .ref_addr }, |
| 4256 | 4256 | }, |
| 4257 | 4257 | }, |
| 4258 | | .decl_extern_nullary_func = .{ |
| 4258 | .decl_extern_empty_func = .{ |
| 4259 | 4259 | .tag = .subprogram, |
| 4260 | 4260 | .attrs = decl_attrs ++ .{ |
| 4261 | 4261 | .{ .linkage_name, .strp }, |
| ... | ... | @@ -4486,7 +4486,7 @@ pub const AbbrevCode = enum { |
| 4486 | 4486 | .{ .ZIG_comptime_value, .ref_addr }, |
| 4487 | 4487 | }, |
| 4488 | 4488 | }, |
| 4489 | | .decl_instance_nullary_func = .{ |
| 4489 | .decl_instance_empty_func = .{ |
| 4490 | 4490 | .tag = .subprogram, |
| 4491 | 4491 | .attrs = decl_instance_attrs ++ .{ |
| 4492 | 4492 | .{ .linkage_name, .strp }, |
| ... | ... | @@ -4511,7 +4511,7 @@ pub const AbbrevCode = enum { |
| 4511 | 4511 | .{ .noreturn, .flag }, |
| 4512 | 4512 | }, |
| 4513 | 4513 | }, |
| 4514 | | .decl_instance_nullary_func_generic = .{ |
| 4514 | .decl_instance_empty_func_generic = .{ |
| 4515 | 4515 | .tag = .subprogram, |
| 4516 | 4516 | .attrs = decl_instance_attrs ++ .{ |
| 4517 | 4517 | .{ .type, .ref_addr }, |
| ... | ... | @@ -4524,7 +4524,7 @@ pub const AbbrevCode = enum { |
| 4524 | 4524 | .{ .type, .ref_addr }, |
| 4525 | 4525 | }, |
| 4526 | 4526 | }, |
| 4527 | | .decl_instance_extern_nullary_func = .{ |
| 4527 | .decl_instance_extern_empty_func = .{ |
| 4528 | 4528 | .tag = .subprogram, |
| 4529 | 4529 | .attrs = decl_instance_attrs ++ .{ |
| 4530 | 4530 | .{ .linkage_name, .strp }, |
| ... | ... | @@ -4827,7 +4827,7 @@ pub const AbbrevCode = enum { |
| 4827 | 4827 | .{ .count, .udata }, |
| 4828 | 4828 | }, |
| 4829 | 4829 | }, |
| 4830 | | .nullary_func_type = .{ |
| 4830 | .empty_func_type = .{ |
| 4831 | 4831 | .tag = .subroutine_type, |
| 4832 | 4832 | .attrs = &.{ |
| 4833 | 4833 | .{ .name, .strp }, |
| ... | ... | @@ -4946,7 +4946,7 @@ pub const AbbrevCode = enum { |
| 4946 | 4946 | .{ .location, .exprloc }, |
| 4947 | 4947 | }, |
| 4948 | 4948 | }, |
| 4949 | | .builtin_extern_nullary_func = .{ |
| 4949 | .builtin_extern_empty_func = .{ |
| 4950 | 4950 | .tag = .subprogram, |
| 4951 | 4951 | .attrs = &.{ |
| 4952 | 4952 | .{ .ZIG_parent, .ref_addr }, |