From 9b616820370c08a97d95805ca31eae5f8ca554f3 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 21 Dec 2016 21:49:05 -0500 Subject: IR: implement runtime enum init and switch on enum with variable --- src/ir_print.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ir_print.cpp') diff --git a/src/ir_print.cpp b/src/ir_print.cpp index c723da4726..7acbbb0207 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -919,9 +919,9 @@ static void ir_print_test_comptime(IrPrint *irp, IrInstructionTestComptime *inst } static void ir_print_init_enum(IrPrint *irp, IrInstructionInitEnum *instruction) { - fprintf(irp->f, "%s.%s { ", buf_ptr(&instruction->enum_type->name), buf_ptr(instruction->field->name)); + fprintf(irp->f, "%s.%s {", buf_ptr(&instruction->enum_type->name), buf_ptr(instruction->field->name)); ir_print_other_instruction(irp, instruction->init_value); - fprintf(irp->f, "{"); + fprintf(irp->f, "}"); } static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) { -- cgit v1.2.3