Fix missing type_info with manual linear search

This commit is contained in:
Ginger Bill
2016-09-08 00:23:14 +01:00
parent 3d02f8a5fd
commit c6d02e4778
13 changed files with 55 additions and 79 deletions
+2 -1
View File
@@ -866,7 +866,7 @@ void check_parsed_files(Checker *c) {
t_type_info_ptr = make_type_pointer(c->allocator, t_type_info);
auto *record = &get_base_type(e->type)->Record;
GB_ASSERT(record->field_count == 15);
GB_ASSERT_MSG(record->field_count == 15, "Internal Compiler Error: Invalid `Type_Info` layout");
t_type_info_named = record->fields[ 1]->type;
t_type_info_integer = record->fields[ 2]->type;
t_type_info_float = record->fields[ 3]->type;
@@ -881,6 +881,7 @@ void check_parsed_files(Checker *c) {
t_type_info_union = record->fields[12]->type;
t_type_info_raw_union = record->fields[13]->type;
t_type_info_enum = record->fields[14]->type;
// t_type_info_any = record->fields[15]->type;
}
check_global_entity(c, Entity_Constant);