diff options
| author | gingerBill <bill@gingerbill.org> | 2021-09-13 00:58:39 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-09-13 00:58:39 +0100 |
| commit | fb8fa5217d4a5081dacc0a74a786cd2efc964fdb (patch) | |
| tree | 49724edef53493c6630aa8b2ae91ea3ad57621a4 /src/llvm_backend_general.cpp | |
| parent | 6585601765c24523e43ca3a158abc61d373168db (diff) | |
Begin minimize `Type` size by replacing `Array` with `Slice` etc
Diffstat (limited to 'src/llvm_backend_general.cpp')
| -rw-r--r-- | src/llvm_backend_general.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp index 113c9ba62..f481c122e 100644 --- a/src/llvm_backend_general.cpp +++ b/src/llvm_backend_general.cpp @@ -1670,7 +1670,7 @@ LLVMTypeRef lb_type_internal(lbModule *m, Type *type) { LLVMTypeRef *fields = gb_alloc_array(permanent_allocator(), LLVMTypeRef, field_count); i64 alignment = type_align_of(type); unsigned size_of_union = cast(unsigned)type_size_of(type); - fields[0] = lb_alignment_prefix_type_hack(m, alignment); + fields[0] = lb_alignment_prefix_type_hack(m, gb_min(alignment, 16)); fields[1] = LLVMArrayType(lb_type(m, t_u8), size_of_union); return LLVMStructTypeInContext(ctx, fields, field_count, false); } |