diff options
| author | Vexu <15308111+Vexu@users.noreply.github.com> | 2019-06-26 20:06:12 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-26 20:06:12 +0300 |
| commit | 22194efe68a112d6d0688f49bf6340a8a952d47c (patch) | |
| tree | f8d4c601b7edac8222cf4cb2c28d08db77726075 /src/ir.cpp | |
| parent | 7325f80bb2aa1759ea5477b8ea26266ecc607db7 (diff) | |
| parent | fa42c99d82448c74a657d16e0f2e5f9877e364c0 (diff) | |
| download | zig-22194efe68a112d6d0688f49bf6340a8a952d47c.tar.gz zig-22194efe68a112d6d0688f49bf6340a8a952d47c.zip | |
Merge branch 'master' into comment-in-array
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 5a4a53b804..0c79316652 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -23280,10 +23280,16 @@ static void ir_eval_float_op(IrAnalyze *ira, IrInstructionFloatOp *source_instr, BuiltinFnId fop = source_instr->op; unsigned bits; - if (float_type->id == ZigTypeIdComptimeFloat) { + switch (float_type->id) { + case ZigTypeIdComptimeFloat: bits = 128; - } else if (float_type->id == ZigTypeIdFloat) + break; + case ZigTypeIdFloat: bits = float_type->data.floating.bit_count; + break; + default: + zig_unreachable(); + } switch (bits) { case 16: { |
