diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-06-18 15:01:42 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-06-18 15:01:42 -0400 |
| commit | 5d705fc6e35e75a604d3dbbb377ab01bf2b2b575 (patch) | |
| tree | a107156cf3a48f1dace171fca865c34ae032f8f2 /src/ir_print.cpp | |
| parent | 1ca90b585692c9611c64412844d2f3a7b3e11340 (diff) | |
| download | zig-5d705fc6e35e75a604d3dbbb377ab01bf2b2b575.tar.gz zig-5d705fc6e35e75a604d3dbbb377ab01bf2b2b575.zip | |
remove error set casting syntax. add `@errSetCast`
See #1061
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index cb91720180..2667c246a5 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -664,6 +664,14 @@ static void ir_print_float_cast(IrPrint *irp, IrInstructionFloatCast *instructio fprintf(irp->f, ")"); } +static void ir_print_err_set_cast(IrPrint *irp, IrInstructionErrSetCast *instruction) { + fprintf(irp->f, "@errSetCast("); + ir_print_other_instruction(irp, instruction->dest_type); + fprintf(irp->f, ", "); + ir_print_other_instruction(irp, instruction->target); + fprintf(irp->f, ")"); +} + static void ir_print_int_to_float(IrPrint *irp, IrInstructionIntToFloat *instruction) { fprintf(irp->f, "@intToFloat("); ir_print_other_instruction(irp, instruction->dest_type); @@ -1461,6 +1469,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdFloatCast: ir_print_float_cast(irp, (IrInstructionFloatCast *)instruction); break; + case IrInstructionIdErrSetCast: + ir_print_err_set_cast(irp, (IrInstructionErrSetCast *)instruction); + break; case IrInstructionIdIntToFloat: ir_print_int_to_float(irp, (IrInstructionIntToFloat *)instruction); break; |
