diff options
Diffstat (limited to 'src/codegen.zig')
| -rw-r--r-- | src/codegen.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codegen.zig b/src/codegen.zig index 3e37a3dbb3..fb06d7a240 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -56,7 +56,7 @@ pub fn generateFunction( ) CodeGenError!void { const zcu = pt.zcu; const func = zcu.funcInfo(func_index); - const target = zcu.navFileScope(func.owner_nav).mod.resolved_target.result; + const target = zcu.navFileScope(func.owner_nav).mod.?.resolved_target.result; switch (target_util.zigBackend(target, false)) { else => unreachable, inline .stage2_aarch64, @@ -81,7 +81,7 @@ pub fn generateLazyFunction( ) CodeGenError!void { const zcu = pt.zcu; const target = if (Type.fromInterned(lazy_sym.ty).typeDeclInstAllowGeneratedTag(zcu)) |inst_index| - zcu.fileByIndex(inst_index.resolveFile(&zcu.intern_pool)).mod.resolved_target.result + zcu.fileByIndex(inst_index.resolveFile(&zcu.intern_pool)).mod.?.resolved_target.result else zcu.getTarget(); switch (target_util.zigBackend(target, false)) { @@ -722,7 +722,7 @@ fn lowerNavRef( const zcu = pt.zcu; const gpa = zcu.gpa; const ip = &zcu.intern_pool; - const target = zcu.navFileScope(nav_index).mod.resolved_target.result; + const target = zcu.navFileScope(nav_index).mod.?.resolved_target.result; const ptr_width_bytes = @divExact(target.ptrBitWidth(), 8); const is_obj = lf.comp.config.output_mode == .Obj; const nav_ty = Type.fromInterned(ip.getNav(nav_index).typeOf(ip)); @@ -884,7 +884,7 @@ fn genNavRef( else .{ false, .none, nav.isThreadlocal(ip) }; - const single_threaded = zcu.navFileScope(nav_index).mod.single_threaded; + const single_threaded = zcu.navFileScope(nav_index).mod.?.single_threaded; const name = nav.name; if (lf.cast(.elf)) |elf_file| { const zo = elf_file.zigObjectPtr().?; |
