| ... | ... | @@ -6630,6 +6630,14 @@ pub const FuncGen = struct { |
| 6630 | 6630 | // tag and the payload. |
| 6631 | 6631 | const index_type = self.context.intType(32); |
| 6632 | 6632 | |
| 6633 | var field_ptr_payload: Type.Payload.Pointer = .{ |
| 6634 | .data = .{ |
| 6635 | .pointee_type = field.ty, |
| 6636 | .@"align" = field_align, |
| 6637 | .@"addrspace" = .generic, |
| 6638 | }, |
| 6639 | }; |
| 6640 | const field_ptr_ty = Type.initPayload(&field_ptr_payload.base); |
| 6633 | 6641 | if (layout.tag_size == 0) { |
| 6634 | 6642 | const indices: [3]*const llvm.Value = .{ |
| 6635 | 6643 | index_type.constNull(), |
| ... | ... | @@ -6638,8 +6646,7 @@ pub const FuncGen = struct { |
| 6638 | 6646 | }; |
| 6639 | 6647 | const len: c_uint = if (field_size == layout.payload_size) 2 else 3; |
| 6640 | 6648 | const field_ptr = self.builder.buildInBoundsGEP(casted_ptr, &indices, len, ""); |
| 6641 | | const store_inst = self.builder.buildStore(llvm_payload, field_ptr); |
| 6642 | | store_inst.setAlignment(field_align); |
| 6649 | self.store(field_ptr, field_ptr_ty, llvm_payload, .NotAtomic); |
| 6643 | 6650 | return result_ptr; |
| 6644 | 6651 | } |
| 6645 | 6652 | |
| ... | ... | @@ -6651,8 +6658,7 @@ pub const FuncGen = struct { |
| 6651 | 6658 | }; |
| 6652 | 6659 | const len: c_uint = if (field_size == layout.payload_size) 2 else 3; |
| 6653 | 6660 | const field_ptr = self.builder.buildInBoundsGEP(casted_ptr, &indices, len, ""); |
| 6654 | | const store_inst = self.builder.buildStore(llvm_payload, field_ptr); |
| 6655 | | store_inst.setAlignment(field_align); |
| 6661 | self.store(field_ptr, field_ptr_ty, llvm_payload, .NotAtomic); |
| 6656 | 6662 | } |
| 6657 | 6663 | { |
| 6658 | 6664 | const indices: [2]*const llvm.Value = .{ |