InternPool: implement hasWellDefinedLayout for simple_type
This commit is contained in:
47
src/type.zig
47
src/type.zig
@@ -2721,7 +2721,52 @@ pub const Type = struct {
|
||||
.vector_type => @panic("TODO"),
|
||||
.optional_type => @panic("TODO"),
|
||||
.error_union_type => @panic("TODO"),
|
||||
.simple_type => @panic("TODO"),
|
||||
.simple_type => |t| return switch (t) {
|
||||
.f16,
|
||||
.f32,
|
||||
.f64,
|
||||
.f80,
|
||||
.f128,
|
||||
.usize,
|
||||
.isize,
|
||||
.c_char,
|
||||
.c_short,
|
||||
.c_ushort,
|
||||
.c_int,
|
||||
.c_uint,
|
||||
.c_long,
|
||||
.c_ulong,
|
||||
.c_longlong,
|
||||
.c_ulonglong,
|
||||
.c_longdouble,
|
||||
.bool,
|
||||
.void,
|
||||
=> true,
|
||||
|
||||
.anyerror,
|
||||
.@"anyframe",
|
||||
.anyopaque,
|
||||
.atomic_order,
|
||||
.atomic_rmw_op,
|
||||
.calling_convention,
|
||||
.address_space,
|
||||
.float_mode,
|
||||
.reduce_op,
|
||||
.call_modifier,
|
||||
.prefetch_options,
|
||||
.export_options,
|
||||
.extern_options,
|
||||
.type,
|
||||
.comptime_int,
|
||||
.comptime_float,
|
||||
.noreturn,
|
||||
.null,
|
||||
.undefined,
|
||||
.enum_literal,
|
||||
.type_info,
|
||||
.generic_poison,
|
||||
=> false,
|
||||
},
|
||||
.struct_type => @panic("TODO"),
|
||||
.simple_value => unreachable,
|
||||
.extern_func => unreachable,
|
||||
|
||||
Reference in New Issue
Block a user