aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/c.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-10-28 13:21:37 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-10-28 13:21:37 -0700
commit234d94e42b832dd17eb9144f5523e03ef4fa8eb3 (patch)
tree700e631cc733543083dc9bd5b6a53e0dedcc1ec5 /src/codegen/c.zig
parent8e93ec6d2491246c841c2f983bb48152b8de2837 (diff)
downloadzig-234d94e42b832dd17eb9144f5523e03ef4fa8eb3.tar.gz
zig-234d94e42b832dd17eb9144f5523e03ef4fa8eb3.zip
C backend: emit decls sorted by dependencies
The C backend is the only backend that requires each decl to be output in an order that satisfies the dependency graph. Here it is implemented with a simple algorithm based on a `remaining_decls` set, using the `dependencies` edges that are already stored for each Decl. This satisfies incremental compilation as well as how `zig test` works, which calls `updateDecl` on `test_functions`.
Diffstat (limited to 'src/codegen/c.zig')
0 files changed, 0 insertions, 0 deletions