diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-01-02 13:40:23 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-01-02 19:11:55 -0700 |
| commit | 006e7f68056af62ae7713d7ef228841d11874735 (patch) | |
| tree | 0d64585b1d78040506a898140ddc619e002b2147 /src/codegen/c.zig | |
| parent | 9362f382ab7023592cc1d71044217b847b122406 (diff) | |
| download | zig-006e7f68056af62ae7713d7ef228841d11874735.tar.gz zig-006e7f68056af62ae7713d7ef228841d11874735.zip | |
stage2: re-use ZIR for comptime and inline calls
Instead of freeing ZIR after semantic analysis, we keep it around so
that it can be used for comptime calls, inline calls, and generic
function calls. ZIR memory is now managed by the Decl arena.
Debug dump() functions are conditionally compiled; only available in
Debug builds of the compiler.
Add a test for an inline function call.
Diffstat (limited to 'src/codegen/c.zig')
| -rw-r--r-- | src/codegen/c.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 712d663af0..1a89e22d48 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -275,7 +275,7 @@ pub fn generate(file: *C, module: *Module, decl: *Decl) !void { try writer.writeAll(" {"); const func: *Module.Fn = func_payload.data; - const instructions = func.data.body.instructions; + const instructions = func.body.instructions; if (instructions.len > 0) { try writer.writeAll("\n"); for (instructions) |inst| { |
