aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-12-21 21:49:05 -0500
committerAndrew Kelley <superjoe30@gmail.com>2016-12-21 21:49:05 -0500
commit9b616820370c08a97d95805ca31eae5f8ca554f3 (patch)
tree02156ccb1d8a72c747a08b4312820e5ab649cdfa /src/ir_print.cpp
parent1f6dacbb2f9a91a20309b271a31e781f11f81819 (diff)
downloadzig-9b616820370c08a97d95805ca31eae5f8ca554f3.tar.gz
zig-9b616820370c08a97d95805ca31eae5f8ca554f3.zip
IR: implement runtime enum init and switch on enum with variable
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp4
1 files changed, 2 insertions, 2 deletions
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) {