fix combining try with errdefer cancel

This commit is contained in:
Andrew Kelley
2019-08-09 21:49:40 -04:00
parent 2e7f53f1f0
commit b9d1d45dfd
5 changed files with 120 additions and 9 deletions

View File

@@ -1554,6 +1554,12 @@ static void ir_print_test_cancel_requested(IrPrint *irp, IrInstructionTestCancel
fprintf(irp->f, "@testCancelRequested()");
}
static void ir_print_spill(IrPrint *irp, IrInstructionSpill *instruction) {
fprintf(irp->f, "@spill(");
ir_print_other_instruction(irp, instruction->operand);
fprintf(irp->f, ")");
}
static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) {
ir_print_prefix(irp, instruction);
switch (instruction->id) {
@@ -2039,6 +2045,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) {
case IrInstructionIdTestCancelRequested:
ir_print_test_cancel_requested(irp, (IrInstructionTestCancelRequested *)instruction);
break;
case IrInstructionIdSpill:
ir_print_spill(irp, (IrInstructionSpill *)instruction);
break;
}
fprintf(irp->f, "\n");
}