mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-02 11:12:31 +00:00
Fix for in enum type
This commit is contained in:
@@ -10104,7 +10104,7 @@ void ir_build_range_enum(irProcedure *proc, Type *enum_type, Type *val_type, irV
|
||||
irValue *max_count = ir_const_int(enum_count);
|
||||
|
||||
irValue *ti = ir_type_info(proc, t);
|
||||
irValue *variant = ir_emit_struct_ep(proc, ti, 3);
|
||||
irValue *variant = ir_emit_struct_ep(proc, ti, 4);
|
||||
irValue *eti_ptr = ir_emit_conv(proc, variant, t_type_info_enum_ptr);
|
||||
irValue *values = ir_emit_load(proc, ir_emit_struct_ep(proc, eti_ptr, 2));
|
||||
irValue *values_data = ir_slice_elem(proc, values);
|
||||
|
||||
@@ -3528,7 +3528,7 @@ void lb_build_range_enum(lbProcedure *p, Type *enum_type, Type *val_type, lbValu
|
||||
lbValue max_count = lb_const_int(m, t_int, enum_count);
|
||||
|
||||
lbValue ti = lb_type_info(m, t);
|
||||
lbValue variant = lb_emit_struct_ep(p, ti, 3);
|
||||
lbValue variant = lb_emit_struct_ep(p, ti, 4);
|
||||
lbValue eti_ptr = lb_emit_conv(p, variant, t_type_info_enum_ptr);
|
||||
lbValue values = lb_emit_load(p, lb_emit_struct_ep(p, eti_ptr, 2));
|
||||
lbValue values_data = lb_slice_elem(p, values);
|
||||
|
||||
Reference in New Issue
Block a user