diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-04-27 18:36:12 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-28 16:57:01 -0700 |
| commit | f86469bc5eea2b7bd95222d00a11bd287bfdfedf (patch) | |
| tree | c34ef71820e4c7b962a631f2b9cdecdff3f5aa79 /src/codegen/wasm.zig | |
| parent | fa6bb4b662155e4d6a61cc551b5d02a2a7d5d144 (diff) | |
| download | zig-f86469bc5eea2b7bd95222d00a11bd287bfdfedf.tar.gz zig-f86469bc5eea2b7bd95222d00a11bd287bfdfedf.zip | |
stage2: semaDecl properly analyzes the decl block
Also flattened out Decl TypedValue fields into
ty, val, has_tv
and add relevant fields to Decl for alignment and link section.
Diffstat (limited to 'src/codegen/wasm.zig')
| -rw-r--r-- | src/codegen/wasm.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codegen/wasm.zig b/src/codegen/wasm.zig index 400a5cd1a3..97155b80dd 100644 --- a/src/codegen/wasm.zig +++ b/src/codegen/wasm.zig @@ -591,7 +591,8 @@ pub const Context = struct { } fn genFunctype(self: *Context) InnerError!void { - const ty = self.decl.typed_value.most_recent.typed_value.ty; + assert(self.decl.has_tv); + const ty = self.decl.ty; const writer = self.func_type_data.writer(); try writer.writeByte(wasm.function_type); |
