aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-05-07 13:40:35 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-05-07 13:40:35 -0400
commit7261cd19b78367d78f758f7ade370efbc3e25237 (patch)
tree750ec114dd9c6c15552796001e95d2f355b4f7ae /src/ir_print.cpp
parentdc2df155285576b8da621fbffac451c036af0ed0 (diff)
downloadzig-7261cd19b78367d78f758f7ade370efbc3e25237.tar.gz
zig-7261cd19b78367d78f758f7ade370efbc3e25237.zip
detect duplicate switch value even when else prong present
closes #43
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index e676ad73a9..88eff409cf 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -807,7 +807,8 @@ static void ir_print_check_switch_prongs(IrPrint *irp, IrInstructionCheckSwitchP
fprintf(irp->f, "...");
ir_print_other_instruction(irp, instruction->ranges[i].end);
}
- fprintf(irp->f, ")");
+ const char *have_else_str = instruction->have_else_prong ? "yes" : "no";
+ fprintf(irp->f, ")else:%s", have_else_str);
}
static void ir_print_check_statement_is_void(IrPrint *irp, IrInstructionCheckStatementIsVoid *instruction) {