diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-12-26 16:34:18 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-12-26 16:34:18 -0500 |
| commit | 66a83d87383cd8de62898171b6665cb1d70af231 (patch) | |
| tree | ff09db18060a350166cd07a9fb039b43d1a63e37 /src/ir_print.cpp | |
| parent | c8a7ab7eff0f261c47926cf0637e919d42e41940 (diff) | |
| download | zig-66a83d87383cd8de62898171b6665cb1d70af231.tar.gz zig-66a83d87383cd8de62898171b6665cb1d70af231.zip | |
IR: pass intToEnum test
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 ebbcf6feae..eb95a2681e 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -952,6 +952,12 @@ static void ir_print_int_to_ptr(IrPrint *irp, IrInstructionIntToPtr *instruction fprintf(irp->f, ")"); } +static void ir_print_int_to_enum(IrPrint *irp, IrInstructionIntToEnum *instruction) { + fprintf(irp->f, "@intToEnum("); + ir_print_other_instruction(irp, instruction->target); + fprintf(irp->f, ")"); +} + static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { ir_print_prefix(irp, instruction); switch (instruction->id) { @@ -1203,6 +1209,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdIntToPtr: ir_print_int_to_ptr(irp, (IrInstructionIntToPtr *)instruction); break; + case IrInstructionIdIntToEnum: + ir_print_int_to_enum(irp, (IrInstructionIntToEnum *)instruction); + break; } fprintf(irp->f, "\n"); } |
