result location semantics for error union wrapping a payload

This commit is contained in:
Andrew Kelley
2019-06-10 16:55:07 -04:00
parent eaa9d8bdac
commit 4f085b8d2c
5 changed files with 43 additions and 39 deletions

View File

@@ -985,8 +985,9 @@ static void ir_print_err_wrap_code(IrPrint *irp, IrInstructionErrWrapCode *instr
static void ir_print_err_wrap_payload(IrPrint *irp, IrInstructionErrWrapPayload *instruction) {
fprintf(irp->f, "@errWrapPayload(");
ir_print_other_instruction(irp, instruction->value);
fprintf(irp->f, ")");
ir_print_other_instruction(irp, instruction->operand);
fprintf(irp->f, ")result=");
ir_print_other_instruction(irp, instruction->result_loc);
}
static void ir_print_fn_proto(IrPrint *irp, IrInstructionFnProto *instruction) {