From 895267c916f874593b0788b198b7de140b6b335b Mon Sep 17 00:00:00 2001 From: mlugg Date: Sun, 11 Aug 2024 23:16:06 +0100 Subject: frontend: incremental progress This commit makes more progress towards incremental compilation, fixing some crashes in the frontend. Notably, it fixes the regressions introduced by #20964. It also cleans up the "outdated file root" mechanism, by virtue of deleting it: we now detect outdated file roots just after updating ZIR refs, and re-scan their namespaces. --- src/codegen/c.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codegen/c.zig') diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 03a1ea3746..7c35a178a0 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -2585,7 +2585,7 @@ pub fn genTypeDecl( const ty = Type.fromInterned(index); _ = try renderTypePrefix(.flush, global_ctype_pool, zcu, writer, global_ctype, .suffix, .{}); try writer.writeByte(';'); - const file_scope = ty.typeDeclInstAllowGeneratedTag(zcu).?.resolveFull(ip).file; + const file_scope = ty.typeDeclInstAllowGeneratedTag(zcu).?.resolveFile(ip); if (!zcu.fileByIndex(file_scope).mod.strip) try writer.print(" /* {} */", .{ ty.containerTypeName(ip).fmt(ip), }); -- cgit v1.2.3