diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-09-29 14:04:52 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-09-29 14:04:52 -0700 |
| commit | ea6706b6f406606a7523e35e34e390fb880b607e (patch) | |
| tree | e3d71639d007cbc528f13d30330fe04c0ac6cbf2 /src/type.zig | |
| parent | 1d1f6a04214027da014cbc8eb780ff4c5e55f863 (diff) | |
| download | zig-ea6706b6f406606a7523e35e34e390fb880b607e.tar.gz zig-ea6706b6f406606a7523e35e34e390fb880b607e.zip | |
stage2: LLVM backend: implement struct type fwd decls
Makes struct types able to refer to themselves.
Diffstat (limited to 'src/type.zig')
| -rw-r--r-- | src/type.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/type.zig b/src/type.zig index 2525aecef6..cd7eb7a7d0 100644 --- a/src/type.zig +++ b/src/type.zig @@ -1785,6 +1785,8 @@ pub const Type = extern union { if (is_packed) @panic("TODO packed structs"); var size: u64 = 0; for (s.fields.values()) |field| { + if (!field.ty.hasCodeGenBits()) continue; + const field_align = a: { if (field.abi_align.tag() == .abi_align_default) { break :a field.ty.abiAlignment(target); |
