Fix IR print bug for empty structs;

This commit is contained in:
gingerBill
2017-07-28 11:35:01 +01:00
parent f0980c0a98
commit 28be0ad69b
5 changed files with 29 additions and 11 deletions
+4
View File
@@ -878,6 +878,10 @@ bool is_type_empty_union(Type *t) {
t = base_type(t);
return t->kind == Type_Union && t->Union.variants.count == 0;
}
bool is_type_empty_struct(Type *t) {
t = base_type(t);
return t->kind == Type_Struct && !t->Struct.is_raw_union && t->Struct.fields.count == 0;
}
bool is_type_valid_for_keys(Type *t) {