diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-05-08 17:39:00 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-05-08 17:39:00 -0400 |
| commit | 0099583bd3eccbecbb827edbde46a40cf821fecf (patch) | |
| tree | cb52a8242e85f3afd3343687efd79d2d1182bb97 /src/ir_print.cpp | |
| parent | 50bbb34594eedf7a978c00edb525bcea472b554b (diff) | |
| download | zig-0099583bd3eccbecbb827edbde46a40cf821fecf.tar.gz zig-0099583bd3eccbecbb827edbde46a40cf821fecf.zip | |
C pointers support .? operator
see #1967
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index dba0e4ee00..08f5cd01a4 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -1003,6 +1003,12 @@ static void ir_print_assert_zero(IrPrint *irp, IrInstructionAssertZero *instruct fprintf(irp->f, ")"); } +static void ir_print_assert_non_null(IrPrint *irp, IrInstructionAssertNonNull *instruction) { + fprintf(irp->f, "AssertNonNull("); + ir_print_other_instruction(irp, instruction->target); + fprintf(irp->f, ")"); +} + static void ir_print_resize_slice(IrPrint *irp, IrInstructionResizeSlice *instruction) { fprintf(irp->f, "@resizeSlice("); ir_print_other_instruction(irp, instruction->operand); @@ -1880,6 +1886,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdAssertZero: ir_print_assert_zero(irp, (IrInstructionAssertZero *)instruction); break; + case IrInstructionIdAssertNonNull: + ir_print_assert_non_null(irp, (IrInstructionAssertNonNull *)instruction); + break; case IrInstructionIdResizeSlice: ir_print_resize_slice(irp, (IrInstructionResizeSlice *)instruction); break; |
