diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-08-08 11:37:49 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-08-08 11:37:49 -0400 |
| commit | 34bfdf193aee4cb4fc931c6cc4ee82ef0a3a506f (patch) | |
| tree | 37d3c11a0b2cc5a2520428c912e53c2b868ffe85 /src/ir_print.cpp | |
| parent | e11cafbd4f11fa5eae0cbdf03854291834b4cd77 (diff) | |
| download | zig-34bfdf193aee4cb4fc931c6cc4ee82ef0a3a506f.tar.gz zig-34bfdf193aee4cb4fc931c6cc4ee82ef0a3a506f.zip | |
cancel, defer, errdefer all working as intended now
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 0348cfc986..8b8445f625 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -1550,6 +1550,11 @@ static void ir_print_await_gen(IrPrint *irp, IrInstructionAwaitGen *instruction) fprintf(irp->f, ")"); } +static void ir_print_test_cancel_requested(IrPrint *irp, IrInstructionTestCancelRequested *instruction) { + const char *arg = instruction->use_return_begin_prev_value ? "UseReturnBeginPrevValue" : "AdditionalCheck"; + fprintf(irp->f, "@testCancelRequested(%s)", arg); +} + static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { ir_print_prefix(irp, instruction); switch (instruction->id) { @@ -2032,6 +2037,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdAwaitGen: ir_print_await_gen(irp, (IrInstructionAwaitGen *)instruction); break; + case IrInstructionIdTestCancelRequested: + ir_print_test_cancel_requested(irp, (IrInstructionTestCancelRequested *)instruction); + break; } fprintf(irp->f, "\n"); } |
