aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-15 00:43:26 -0400
committerGitHub <noreply@github.com>2022-03-15 00:43:26 -0400
commit9eceba248511849ff77a90876424f9930bf7f9f9 (patch)
treed6691a25a828b44cb4c17365fb8549d339046810 /src/Module.zig
parenta2a5d3c2885cacf16d55d7943d10a81a5dc31b8a (diff)
parent2f92d1a0264b6827cb67a55726c4c9a082337508 (diff)
downloadzig-9eceba248511849ff77a90876424f9930bf7f9f9.tar.gz
zig-9eceba248511849ff77a90876424f9930bf7f9f9.zip
Merge pull request #11128 from topolarity/comptime-memory-reinterp
stage2: Track parent type for `.elem_ptr`, `.field_ptr`, and `.*_payload_ptr`
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Module.zig b/src/Module.zig
index b6104df232..20bf25af03 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -852,7 +852,7 @@ pub const ErrorSet = struct {
}
};
-pub const RequiresComptime = enum { no, yes, unknown, wip };
+pub const PropertyBoolean = enum { no, yes, unknown, wip };
/// Represents the data that a struct declaration provides.
pub const Struct = struct {
@@ -884,7 +884,7 @@ pub const Struct = struct {
/// If false, resolving the fields is necessary to determine whether the type has only
/// one possible value.
known_non_opv: bool,
- requires_comptime: RequiresComptime = .unknown,
+ requires_comptime: PropertyBoolean = .unknown,
pub const Fields = std.StringArrayHashMapUnmanaged(Field);
@@ -1089,6 +1089,8 @@ pub const EnumFull = struct {
namespace: Namespace,
/// Offset from `owner_decl`, points to the enum decl AST node.
node_offset: i32,
+ /// true if zig inferred this tag type, false if user specified it
+ tag_ty_inferred: bool,
pub const NameMap = std.StringArrayHashMapUnmanaged(void);
pub const ValueMap = std.ArrayHashMapUnmanaged(Value, void, Value.ArrayHashContext, false);
@@ -1132,7 +1134,7 @@ pub const Union = struct {
// which `have_layout` does not ensure.
fully_resolved,
},
- requires_comptime: RequiresComptime = .unknown,
+ requires_comptime: PropertyBoolean = .unknown,
pub const Field = struct {
/// undefined until `status` is `have_field_types` or `have_layout`.