commit fe39ca01bcbee0077b21d5ddc2776df974e8c6d3 (tree)
parent 42004f9013ba2d06b457f858e0e269ef4ad23554
Author: Andrew Kelley <superjoe30@gmail.com>
Date: Mon, 4 Dec 2017 17:45:21 -0500
Merge remote-tracking branch 'origin/master' into llvm6
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/codegen.cpp b/src/codegen.cpp
@@ -3964,7 +3964,7 @@ static LLVMValueRef gen_const_val(CodeGen *g, ConstExprValue *const_val) {
if (type_entry->data.unionation.gen_tag_index == SIZE_MAX)
return LLVMGetUndef(type_entry->type_ref);
- union_value_ref = LLVMGetUndef(type_entry->data.unionation.most_aligned_union_member->type_ref);
+ union_value_ref = LLVMGetUndef(union_type_ref);
make_unnamed_struct = false;
} else {
uint64_t field_type_bytes = LLVMStoreSizeOfType(g->target_data_ref, payload_value->type->type_ref);