diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-03-08 23:59:56 +0000 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2024-03-14 07:40:07 +0000 |
| commit | 7ba8641d19b719c11c0f6177fb28fa098a769e1f (patch) | |
| tree | c4ec6df6cb9205f15d6d0ef64eaa7e191725d60a /src/Sema.zig | |
| parent | 42fedb3f6c8f9c54da8faea35f424cbd3f72c386 (diff) | |
| download | zig-7ba8641d19b719c11c0f6177fb28fa098a769e1f.tar.gz zig-7ba8641d19b719c11c0f6177fb28fa098a769e1f.zip | |
Zcu: handle updates to file root struct
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 4 |
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); } |
