Have different categories for optimization passes

This commit is contained in:
gingerBill
2020-03-19 10:57:14 +00:00
parent 1707e004ec
commit 04fe23a3c8
4 changed files with 475 additions and 197 deletions
+8
View File
@@ -3190,6 +3190,14 @@ i64 type_offset_of_from_selection(Type *type, Selection sel) {
return offset;
}
Type *get_struct_field_type(Type *t, isize index) {
t = base_type(type_deref(t));
GB_ASSERT(t->kind == Type_Struct);
return t->Struct.fields[index]->type;
}
gbString write_type_to_string(gbString str, Type *type) {
if (type == nullptr) {
return gb_string_appendc(str, "<no type>");