| ... | @@ -3180,6 +3180,7 @@ fn airSwitchBr(f: *Function, inst: Air.Inst.Index) !CValue { | ... | @@ -3180,6 +3180,7 @@ fn airSwitchBr(f: *Function, inst: Air.Inst.Index) !CValue { |
| 3180 | const writer = f.object.writer(); | 3180 | const writer = f.object.writer(); |
| 3181 | | 3181 | |
| 3182 | try writer.writeAll("switch ("); | 3182 | try writer.writeAll("switch ("); |
| | 3183 | if (condition_ty.tag() == .bool) try writer.writeAll("(int)"); |
| 3183 | try f.writeCValue(writer, condition); | 3184 | try f.writeCValue(writer, condition); |
| 3184 | try writer.writeAll(") {"); | 3185 | try writer.writeAll(") {"); |
| 3185 | f.object.indent_writer.pushIndent(); | 3186 | f.object.indent_writer.pushIndent(); |