| ... | ... | @@ -7195,7 +7195,7 @@ check: switch (const_val->special) { |
| 7195 | 7195 | union_value_ref = LLVMGetUndef(union_type_ref); |
| 7196 | 7196 | make_unnamed_struct = false; |
| 7197 | 7197 | } else { |
| 7198 | | uint64_t field_type_bytes = LLVMStoreSizeOfType(g->target_data_ref, |
| 7198 | uint64_t field_type_bytes = LLVMABISizeOfType(g->target_data_ref, |
| 7199 | 7199 | get_llvm_type(g, payload_value->type)); |
| 7200 | 7200 | uint64_t pad_bytes = type_entry->data.unionation.union_abi_size - field_type_bytes; |
| 7201 | 7201 | LLVMValueRef correctly_typed_value = gen_const_val(g, payload_value, ""); |
| ... | ... | @@ -7235,7 +7235,7 @@ check: switch (const_val->special) { |
| 7235 | 7235 | uint64_t last_field_offset = LLVMOffsetOfElement(g->target_data_ref, LLVMTypeOf(result), 1); |
| 7236 | 7236 | uint64_t end_offset = last_field_offset + |
| 7237 | 7237 | LLVMStoreSizeOfType(g->target_data_ref, LLVMTypeOf(fields[1])); |
| 7238 | | uint64_t expected_sz = LLVMStoreSizeOfType(g->target_data_ref, get_llvm_type(g, type_entry)); |
| 7238 | uint64_t expected_sz = LLVMABISizeOfType(g->target_data_ref, get_llvm_type(g, type_entry)); |
| 7239 | 7239 | unsigned pad_sz = expected_sz - end_offset; |
| 7240 | 7240 | if (pad_sz != 0) { |
| 7241 | 7241 | fields[2] = LLVMGetUndef(LLVMArrayType(LLVMInt8Type(), pad_sz)); |