| ... | @@ -4715,7 +4715,6 @@ static LLVMValueRef ir_render_err_wrap_payload(CodeGen *g, IrExecutable *executa | ... | @@ -4715,7 +4715,6 @@ static LLVMValueRef ir_render_err_wrap_payload(CodeGen *g, IrExecutable *executa |
| 4715 | | 4715 | |
| 4716 | static LLVMValueRef ir_render_union_tag(CodeGen *g, IrExecutable *executable, IrInstructionUnionTag *instruction) { | 4716 | static LLVMValueRef ir_render_union_tag(CodeGen *g, IrExecutable *executable, IrInstructionUnionTag *instruction) { |
| 4717 | ZigType *union_type = instruction->value->value.type; | 4717 | ZigType *union_type = instruction->value->value.type; |
| 4718 | assert(union_type->data.unionation.gen_tag_index != SIZE_MAX); | | |
| 4719 | | 4718 | |
| 4720 | ZigType *tag_type = union_type->data.unionation.tag_type; | 4719 | ZigType *tag_type = union_type->data.unionation.tag_type; |
| 4721 | if (!type_has_bits(tag_type)) | 4720 | if (!type_has_bits(tag_type)) |
| ... | @@ -4725,6 +4724,7 @@ static LLVMValueRef ir_render_union_tag(CodeGen *g, IrExecutable *executable, Ir | ... | @@ -4725,6 +4724,7 @@ static LLVMValueRef ir_render_union_tag(CodeGen *g, IrExecutable *executable, Ir |
| 4725 | if (union_type->data.unionation.gen_field_count == 0) | 4724 | if (union_type->data.unionation.gen_field_count == 0) |
| 4726 | return union_val; | 4725 | return union_val; |
| 4727 | | 4726 | |
| | 4727 | assert(union_type->data.unionation.gen_tag_index != SIZE_MAX); |
| 4728 | LLVMValueRef tag_field_ptr = LLVMBuildStructGEP(g->builder, union_val, | 4728 | LLVMValueRef tag_field_ptr = LLVMBuildStructGEP(g->builder, union_val, |
| 4729 | union_type->data.unionation.gen_tag_index, ""); | 4729 | union_type->data.unionation.gen_tag_index, ""); |
| 4730 | ZigType *ptr_type = get_pointer_to_type(g, tag_type, false); | 4730 | ZigType *ptr_type = get_pointer_to_type(g, tag_type, false); |