fix compilation error

This commit is contained in:
Andrew Kelley 2020-01-26 00:55:04 -05:00
parent 9dffc369f1
commit d9fb6c2054
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -23263,9 +23263,9 @@ static IrInstGen *ir_analyze_instruction_enum_tag_name(IrAnalyze *ira, IrInstSrc
}
if (target->value->type->id != ZigTypeIdEnum) {
ir_add_error(ira, target,
ir_add_error(ira, &target->base,
buf_sprintf("expected enum tag, found '%s'", buf_ptr(&target->value->type->name)));
return ira->codegen->invalid_instruction;
return ira->codegen->invalid_inst_gen;
}
if (target->value->type->data.enumeration.src_field_count == 1 &&