| ... | @@ -6653,6 +6653,9 @@ static void resolve_llvm_types_union(CodeGen *g, ZigType *union_type, ResolveSta | ... | @@ -6653,6 +6653,9 @@ static void resolve_llvm_types_union(CodeGen *g, ZigType *union_type, ResolveSta |
| 6653 | if (!type_has_bits(union_field->type_entry)) | 6653 | if (!type_has_bits(union_field->type_entry)) |
| 6654 | continue; | 6654 | continue; |
| 6655 | | 6655 | |
| | 6656 | ZigLLVMDIType *field_di_type = get_llvm_di_type(g, union_field->type_entry); |
| | 6657 | if (union_type->data.unionation.resolve_status >= wanted_resolve_status) return; |
| | 6658 | |
| 6656 | uint64_t store_size_in_bits = union_field->type_entry->size_in_bits; | 6659 | uint64_t store_size_in_bits = union_field->type_entry->size_in_bits; |
| 6657 | uint64_t abi_align_in_bits = 8*union_field->type_entry->abi_align; | 6660 | uint64_t abi_align_in_bits = 8*union_field->type_entry->abi_align; |
| 6658 | AstNode *field_node = decl_node->data.container_decl.fields.at(i); | 6661 | AstNode *field_node = decl_node->data.container_decl.fields.at(i); |
| ... | @@ -6662,7 +6665,7 @@ static void resolve_llvm_types_union(CodeGen *g, ZigType *union_type, ResolveSta | ... | @@ -6662,7 +6665,7 @@ static void resolve_llvm_types_union(CodeGen *g, ZigType *union_type, ResolveSta |
| 6662 | store_size_in_bits, | 6665 | store_size_in_bits, |
| 6663 | abi_align_in_bits, | 6666 | abi_align_in_bits, |
| 6664 | 0, | 6667 | 0, |
| 6665 | 0, get_llvm_di_type(g, union_field->type_entry)); | 6668 | 0, field_di_type); |
| 6666 | | 6669 | |
| 6667 | } | 6670 | } |
| 6668 | | 6671 | |
| ... | @@ -6670,8 +6673,6 @@ static void resolve_llvm_types_union(CodeGen *g, ZigType *union_type, ResolveSta | ... | @@ -6670,8 +6673,6 @@ static void resolve_llvm_types_union(CodeGen *g, ZigType *union_type, ResolveSta |
| 6670 | assert(most_aligned_union_member != nullptr); | 6673 | assert(most_aligned_union_member != nullptr); |
| 6671 | | 6674 | |
| 6672 | size_t padding_bytes = union_type->data.unionation.union_abi_size - most_aligned_union_member->abi_size; | 6675 | size_t padding_bytes = union_type->data.unionation.union_abi_size - most_aligned_union_member->abi_size; |
| 6673 | (void)get_llvm_type(g, most_aligned_union_member); | | |
| 6674 | if (union_type->data.unionation.resolve_status >= wanted_resolve_status) return; | | |
| 6675 | if (padding_bytes > 0) { | 6676 | if (padding_bytes > 0) { |
| 6676 | ZigType *u8_type = get_int_type(g, false, 8); | 6677 | ZigType *u8_type = get_int_type(g, false, 8); |
| 6677 | ZigType *padding_array = get_array_type(g, u8_type, padding_bytes); | 6678 | ZigType *padding_array = get_array_type(g, u8_type, padding_bytes); |