diff --git a/src/link/Dwarf.zig b/src/link/Dwarf.zig index 38021aa42f0a4b4211889afeb514e6ed3cda6933..806a85ff23cb3a0b8ead4e6716b24de3b70995f5 100644 --- a/src/link/Dwarf.zig +++ b/src/link/Dwarf.zig @@ -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; },