Dwarf: be even dumber about source locations

This commit is contained in:
Matthew Lugg 2026-02-23 11:53:29 +00:00
parent f9f0c2f933
commit 00c390c958
No known key found for this signature in database
GPG key ID: 3F5B7DCCBF4AF02E

View file

@ -3461,7 +3461,7 @@ fn updateConstInner(dwarf: *Dwarf, pt: Zcu.PerThread, debug_const_index: link.Co
// without trying to tie them to a bogus source location.
const src_loc: Zcu.LazySrcLoc = .{
.base_node_inst = inst: {
const mod_root_file_index = zcu.module_roots.get(dwarf.getUnitModule(unit)).?.unwrap().?;
const mod_root_file_index = zcu.module_roots.get(zcu.std_mod).?.unwrap().?;
const mod_root_type_index = zcu.fileRootType(mod_root_file_index);
break :inst ip.loadStructType(mod_root_type_index).zir_index;
},