diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-10-19 21:23:09 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-10-21 21:38:41 -0400 |
| commit | c4fcf0e22a0a0bab19ac9d1335b10decbfb2f137 (patch) | |
| tree | ab9d2b9228c6dfd927cdc5a6536811412d03c62b /src/arch/wasm/CodeGen.zig | |
| parent | dd402f6d83071535fffac055fabe72ebcb0db994 (diff) | |
| download | zig-c4fcf0e22a0a0bab19ac9d1335b10decbfb2f137.tar.gz zig-c4fcf0e22a0a0bab19ac9d1335b10decbfb2f137.zip | |
codegen: implement lowering aligned anon decls
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
| -rw-r--r-- | src/arch/wasm/CodeGen.zig | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig index 639af3d8c4..83ab118ac5 100644 --- a/src/arch/wasm/CodeGen.zig +++ b/src/arch/wasm/CodeGen.zig @@ -3153,11 +3153,8 @@ fn lowerAnonDeclRef( return WValue{ .imm32 = 0xaaaaaaaa }; } - const alignment = mod.intern_pool.indexToKey(anon_decl.orig_ty).ptr_type.flags.alignment; - if (alignment != .none) { - @panic("TODO how to make this anon decl be aligned?"); - } - const res = try func.bin_file.lowerAnonDecl(decl_val, func.decl.srcLoc(mod)); + const decl_align = mod.intern_pool.indexToKey(anon_decl.orig_ty).ptr_type.flags.alignment; + const res = try func.bin_file.lowerAnonDecl(decl_val, decl_align, func.decl.srcLoc(mod)); switch (res) { .ok => {}, .fail => |em| { |
