diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-11-26 04:37:34 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-11-26 04:37:34 -0500 |
| commit | 24b65e41ee241c805e0eff8212ef49c5c39e4b8e (patch) | |
| tree | 21a244d5af04f68a9eb4e88ea7ce025758f6fcab /src/ir_print.cpp | |
| parent | 697c768730ad4c095c376079adbb97854db84cb9 (diff) | |
| download | zig-24b65e41ee241c805e0eff8212ef49c5c39e4b8e.tar.gz zig-24b65e41ee241c805e0eff8212ef49c5c39e4b8e.zip | |
IR: add error for non static const on switch case range
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 5965e33b0b..9e92403821 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -569,6 +569,12 @@ static void ir_print_enum_tag(IrPrint *irp, IrInstructionEnumTag *instruction) { ir_print_other_instruction(irp, instruction->value); } +static void ir_print_static_eval(IrPrint *irp, IrInstructionStaticEval *instruction) { + fprintf(irp->f, "@staticEval("); + ir_print_other_instruction(irp, instruction->value); + fprintf(irp->f, ")"); +} + static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { ir_print_prefix(irp, instruction); switch (instruction->id) { @@ -691,6 +697,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdEnumTag: ir_print_enum_tag(irp, (IrInstructionEnumTag *)instruction); break; + case IrInstructionIdStaticEval: + ir_print_static_eval(irp, (IrInstructionStaticEval *)instruction); + break; } fprintf(irp->f, "\n"); } |
