diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-07-26 19:52:35 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-07-26 19:52:35 -0400 |
| commit | ee64a22045ccbc39773779d4e386e25f563c8a90 (patch) | |
| tree | 95263984be9a72a1c9cc102b55e715a83a38b8eb /src/ir_print.cpp | |
| parent | 018a89c7a1b2763a50375f6d6d168dfa1f877f6a (diff) | |
| download | zig-ee64a22045ccbc39773779d4e386e25f563c8a90.tar.gz zig-ee64a22045ccbc39773779d4e386e25f563c8a90.zip | |
add the `anyframe` and `anyframe->T` types
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index ae467bdc8c..284ebed2f3 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -471,6 +471,15 @@ static void ir_print_slice_type(IrPrint *irp, IrInstructionSliceType *instructio ir_print_other_instruction(irp, instruction->child_type); } +static void ir_print_any_frame_type(IrPrint *irp, IrInstructionAnyFrameType *instruction) { + if (instruction->payload_type == nullptr) { + fprintf(irp->f, "anyframe"); + } else { + fprintf(irp->f, "anyframe->"); + ir_print_other_instruction(irp, instruction->payload_type); + } +} + static void ir_print_global_asm(IrPrint *irp, IrInstructionGlobalAsm *instruction) { fprintf(irp->f, "asm(\"%s\")", buf_ptr(instruction->asm_code)); } @@ -1629,6 +1638,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdSliceType: ir_print_slice_type(irp, (IrInstructionSliceType *)instruction); break; + case IrInstructionIdAnyFrameType: + ir_print_any_frame_type(irp, (IrInstructionAnyFrameType *)instruction); + break; case IrInstructionIdGlobalAsm: ir_print_global_asm(irp, (IrInstructionGlobalAsm *)instruction); break; |
