aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-03-08 23:59:56 +0000
committermlugg <mlugg@mlugg.co.uk>2024-03-14 07:40:07 +0000
commit7ba8641d19b719c11c0f6177fb28fa098a769e1f (patch)
treec4ec6df6cb9205f15d6d0ef64eaa7e191725d60a /src/Sema.zig
parent42fedb3f6c8f9c54da8faea35f424cbd3f72c386 (diff)
downloadzig-7ba8641d19b719c11c0f6177fb28fa098a769e1f.tar.gz
zig-7ba8641d19b719c11c0f6177fb28fa098a769e1f.zip
Zcu: handle updates to file root struct
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 35adfdb25b..babdf95704 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -5883,7 +5883,7 @@ fn zirCImport(sema: *Sema, parent_block: *Block, inst: Zir.Inst.Index) CompileEr
mod.astGenFile(result.file) catch |err|
return sema.fail(&child_block, src, "C import failed: {s}", .{@errorName(err)});
- try mod.semaFile(result.file);
+ try mod.ensureFileAnalyzed(result.file);
const file_root_decl_index = result.file.root_decl.unwrap().?;
return sema.analyzeDeclVal(parent_block, src, file_root_decl_index);
}
@@ -13705,7 +13705,7 @@ fn zirImport(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.
return sema.fail(block, operand_src, "unable to open '{s}': {s}", .{ operand, @errorName(err) });
},
};
- try mod.semaFile(result.file);
+ try mod.ensureFileAnalyzed(result.file);
const file_root_decl_index = result.file.root_decl.unwrap().?;
return sema.analyzeDeclVal(block, operand_src, file_root_decl_index);
}