C backend: start handling anonymous decls

Start keeping track of dependencies on anon decls for dependency
ordering during flush()

Currently this causes use of undefined symbols because these
dependencies need to get rendered into the output.
This commit is contained in:
Andrew Kelley
2023-09-27 21:47:35 -07:00
parent c0b5512544
commit 9d069d98e3
3 changed files with 136 additions and 73 deletions

View File

@@ -3499,6 +3499,7 @@ fn processOneJob(comp: *Compilation, job: Job, prog_node: *std.Progress.Node) !v
.is_naked_fn = false,
.fwd_decl = fwd_decl.toManaged(gpa),
.ctypes = .{},
.anon_decl_deps = .{},
};
defer {
dg.ctypes.deinit(gpa);