Fixes initialization of anonymous structs. Bump version 0.2.11

This commit is contained in:
Christoffer Lerno
2022-07-10 23:20:02 +02:00
committed by Christoffer Lerno
parent ca21b1daac
commit ea5d7cd2e7
5 changed files with 197 additions and 16 deletions

View File

@@ -208,6 +208,7 @@ LLVMValueRef llvm_emit_const_initializer(GenContext *c, ConstInitializer *const_
Decl *decl = const_init->type->decl;
Decl **members = decl->strukt.members;
uint32_t count = vec_size(members);
if (decl->decl_kind == DECL_UNION && count) count = 1;
LLVMValueRef *entries = NULL;
bool was_modified = false;
for (MemberIndex i = 0; i < count; i++)