diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-11-22 20:30:20 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-11-22 20:30:20 -0700 |
| commit | e08b6149ab8fb80ad8fa4983ad3aca8ef3303a9f (patch) | |
| tree | f4e943be0e2c2f456fe46106cd6d6842a1b7d3ff /src/value.zig | |
| parent | e8b99428737c401afeb118fa277da362e903b3ca (diff) | |
| download | zig-e08b6149ab8fb80ad8fa4983ad3aca8ef3303a9f.tar.gz zig-e08b6149ab8fb80ad8fa4983ad3aca8ef3303a9f.zip | |
Sema: fix alignment of type-inferred locals
Diffstat (limited to 'src/value.zig')
| -rw-r--r-- | src/value.zig | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/value.zig b/src/value.zig index d4ee5bcf0c..cc030faaae 100644 --- a/src/value.zig +++ b/src/value.zig @@ -256,7 +256,6 @@ pub const Value = extern union { .extern_fn, .decl_ref, - .inferred_alloc_comptime, => Payload.Decl, .repeated, @@ -291,6 +290,7 @@ pub const Value = extern union { .float_128 => Payload.Float_128, .@"error" => Payload.Error, .inferred_alloc => Payload.InferredAlloc, + .inferred_alloc_comptime => Payload.InferredAllocComptime, .@"struct" => Payload.Struct, .@"union" => Payload.Union, .bound_fn => Payload.BoundFn, @@ -2889,6 +2889,19 @@ pub const Value = extern union { /// the items are contiguous in memory and thus can be passed to /// `Module.resolvePeerTypes`. stored_inst_list: std.ArrayListUnmanaged(Air.Inst.Ref) = .{}, + /// 0 means ABI-aligned. + alignment: u16, + }, + }; + + pub const InferredAllocComptime = struct { + pub const base_tag = Tag.inferred_alloc_comptime; + + base: Payload = .{ .tag = base_tag }, + data: struct { + decl: *Module.Decl, + /// 0 means ABI-aligned. + alignment: u16, }, }; |
