Otherwise the compiler can crash for recursive structs
return;
if (type->compound->layouted)
return;
+ compound->layouted = true;
il_size_t offset = 0;
il_alignment_t alignment = compound->alignment;
compound->size = offset;
compound->alignment = alignment;
- compound->layouted = true;
}
void layout_union_type(compound_type_t *type)
compound_t *compound = type->compound;
if (! compound->complete)
return;
+ if (compound->layouted)
+ return;
+ compound->layouted = true;
il_size_t size = 0;
il_alignment_t alignment = compound->alignment;