diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-11-27 01:22:30 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-11-27 01:22:30 -0500 |
| commit | d9329ed389e4454c631772674beee459c7783069 (patch) | |
| tree | 97a126a50745427996f3ce8b14c57062451bf29c /src/ir_print.cpp | |
| parent | bd4d4ee51efebb79ed7b563a10eec992a71220fd (diff) | |
| download | zig-d9329ed389e4454c631772674beee459c7783069.tar.gz zig-d9329ed389e4454c631772674beee459c7783069.zip | |
IR: add ref instruction
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 46e8a91ad8..98ed8ebcc1 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -586,6 +586,11 @@ static void ir_print_array_len(IrPrint *irp, IrInstructionArrayLen *instruction) fprintf(irp->f, ".len"); } +static void ir_print_ref(IrPrint *irp, IrInstructionRef *instruction) { + fprintf(irp->f, "ref "); + ir_print_other_instruction(irp, instruction->value); +} + static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { ir_print_prefix(irp, instruction); switch (instruction->id) { @@ -714,6 +719,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdArrayLen: ir_print_array_len(irp, (IrInstructionArrayLen *)instruction); break; + case IrInstructionIdRef: + ir_print_ref(irp, (IrInstructionRef *)instruction); + break; } fprintf(irp->f, "\n"); } |
