pub const UnionDecl = struct fields_hash_0: u32These fields should be concatenated and reinterpreted as a std.zig.SrcHash. This hash contains the source of all fields, and any specified attributes (extern etc).
fields_hash_1: u32fields_hash_2: u32fields_hash_3: u32src_line: u32src_column: u32src_node: Ast.Node.IndexThis node provides a new absolute baseline node for all instructions within this struct.
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756 pub const UnionDecl = struct {
// These fields should be concatenated and reinterpreted as a `std.zig.SrcHash`.
// This hash contains the source of all fields, and any specified attributes (`extern` etc).
fields_hash_0: u32,
fields_hash_1: u32,
fields_hash_2: u32,
fields_hash_3: u32,
src_line: u32,
src_column: u32,
/// This node provides a new absolute baseline node for all instructions within this struct.
src_node: Ast.Node.Index,
pub const Small = packed struct(u16) {
has_captures_len: bool,
has_decls_len: bool,
has_fields_len: bool,
name_strategy: NameStrategy,
kind: Kind,
any_field_aligns: bool,
any_field_values: bool,
_: u6 = 0,
};
pub const Kind = enum(u3) {
/// `union`
auto,
/// `union(T)`
tagged_explicit,
/// `union(enum)`
tagged_enum,
/// `union(enum(T))`
tagged_enum_explicit,
/// `extern union`
@"extern",
/// `packed union`
@"packed",
/// `packed union(T)`
packed_explicit,
pub fn hasArgType(k: Kind) bool {
return switch (k) {
.auto, .tagged_enum, .@"extern", .@"packed" => false,
.tagged_explicit, .tagged_enum_explicit, .packed_explicit => true,
};
}
pub fn layout(k: Kind) std.lang.Type.ContainerLayout {
return switch (k) {
.auto, .tagged_explicit, .tagged_enum, .tagged_enum_explicit => .auto,
.@"extern" => .@"extern",
.@"packed", .packed_explicit => .@"packed",
};
}
};
}
Trailing:
has_captures_lenhas_decls_lenhas_fields_lenkind.hasArgType()captures_lencaptures_lendecls_len; points to adeclarationinstructionfields_lenfields_len9 . field_align_body_len: u32 // for everyfields_lenifany_field_alignsfields_lenifany_field_valuesarg_type_body_len