From b62e2fd8703129fcf0dc80675800f005e84ee724 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 30 Nov 2017 21:46:02 -0500 Subject: ability to specify tag type of enums see #305 --- src/ir_print.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/ir_print.cpp') diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 55ad3ceb6c..0e06d1b563 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -994,6 +994,12 @@ static void ir_print_arg_type(IrPrint *irp, IrInstructionArgType *instruction) { fprintf(irp->f, ")"); } +static void ir_print_enum_tag_type(IrPrint *irp, IrInstructionEnumTagType *instruction) { + fprintf(irp->f, "@EnumTagType("); + ir_print_other_instruction(irp, instruction->target); + fprintf(irp->f, ")"); +} + static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { ir_print_prefix(irp, instruction); @@ -1312,6 +1318,9 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { case IrInstructionIdArgType: ir_print_arg_type(irp, (IrInstructionArgType *)instruction); break; + case IrInstructionIdEnumTagType: + ir_print_enum_tag_type(irp, (IrInstructionEnumTagType *)instruction); + break; } fprintf(irp->f, "\n"); } -- cgit v1.2.3