Make lb_type_info use a procedure to load the global value

This commit is contained in:
gingerBill
2024-02-27 15:45:53 +00:00
parent 5137d12d36
commit 5107bdc06b
5 changed files with 9 additions and 12 deletions
+1 -1
View File
@@ -748,7 +748,7 @@ gb_internal void lb_build_range_enum(lbProcedure *p, Type *enum_type, Type *val_
i64 enum_count = t->Enum.fields.count;
lbValue max_count = lb_const_int(m, t_int, enum_count);
lbValue ti = lb_type_info(m, t);
lbValue ti = lb_type_info(p, t);
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));