diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-04-22 16:07:58 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-22 16:07:58 -0700 |
| commit | 3d637e6dd257d617867e12ac949d966d2c2ef48a (patch) | |
| tree | 4e9b0513c63fd21c91850f777c40154081f71dab /src/value.zig | |
| parent | 130ad08001f73d62e0c6daf3848da4f7aedff614 (diff) | |
| download | zig-3d637e6dd257d617867e12ac949d966d2c2ef48a.tar.gz zig-3d637e6dd257d617867e12ac949d966d2c2ef48a.zip | |
AstGen: fix `@export`
Make it properly use `std.builtin.ExportOptions`.
Diffstat (limited to 'src/value.zig')
| -rw-r--r-- | src/value.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/value.zig b/src/value.zig index 80b21f0713..4776cb5a76 100644 --- a/src/value.zig +++ b/src/value.zig @@ -72,6 +72,7 @@ pub const Value = extern union { float_mode_type, reduce_op_type, call_options_type, + export_options_type, undef, zero, @@ -185,6 +186,7 @@ pub const Value = extern union { .float_mode_type, .reduce_op_type, .call_options_type, + .export_options_type, => @compileError("Value Tag " ++ @tagName(t) ++ " has no payload"), .int_big_positive, @@ -351,6 +353,7 @@ pub const Value = extern union { .float_mode_type, .reduce_op_type, .call_options_type, + .export_options_type, => unreachable, .ty => { @@ -506,6 +509,7 @@ pub const Value = extern union { .float_mode_type => return out_stream.writeAll("std.builtin.FloatMode"), .reduce_op_type => return out_stream.writeAll("std.builtin.ReduceOp"), .call_options_type => return out_stream.writeAll("std.builtin.CallOptions"), + .export_options_type => return out_stream.writeAll("std.builtin.ExportOptions"), .abi_align_default => return out_stream.writeAll("(default ABI alignment)"), .empty_struct_value => return out_stream.writeAll("struct {}{}"), @@ -635,6 +639,7 @@ pub const Value = extern union { .float_mode_type => Type.initTag(.float_mode), .reduce_op_type => Type.initTag(.reduce_op), .call_options_type => Type.initTag(.call_options), + .export_options_type => Type.initTag(.export_options), .int_type => { const payload = self.castTag(.int_type).?.data; @@ -1181,6 +1186,7 @@ pub const Value = extern union { .float_mode_type, .reduce_op_type, .call_options_type, + .export_options_type, => @panic("TODO this hash function looks pretty broken. audit it"), } return hasher.final(); @@ -1336,6 +1342,7 @@ pub const Value = extern union { .float_mode_type, .reduce_op_type, .call_options_type, + .export_options_type, => true, .zero, |
