| ... | @@ -79,7 +79,6 @@ const BuiltinInfo = enum { | ... | @@ -79,7 +79,6 @@ const BuiltinInfo = enum { |
| 79 | Bits, | 79 | Bits, |
| 80 | }; | 80 | }; |
| 81 | | 81 | |
| 82 | /// TODO make this not cut off at 128 bytes | | |
| 83 | fn formatTypeAsCIdentifier( | 82 | fn formatTypeAsCIdentifier( |
| 84 | data: FormatTypeAsCIdentContext, | 83 | data: FormatTypeAsCIdentContext, |
| 85 | comptime fmt: []const u8, | 84 | comptime fmt: []const u8, |
| ... | @@ -3666,14 +3665,15 @@ fn airBr(f: *Function, inst: Air.Inst.Index) !CValue { | ... | @@ -3666,14 +3665,15 @@ fn airBr(f: *Function, inst: Air.Inst.Index) !CValue { |
| 3666 | } | 3665 | } |
| 3667 | | 3666 | |
| 3668 | fn airBitcast(f: *Function, inst: Air.Inst.Index) !CValue { | 3667 | fn airBitcast(f: *Function, inst: Air.Inst.Index) !CValue { |
| 3669 | if (f.liveness.isUnused(inst)) | 3668 | const inst_ty = f.air.typeOfIndex(inst); |
| 3670 | return CValue.none; | 3669 | // No IgnoreComptime until Sema stops giving us garbage Air. |
| | 3670 | // https://github.com/ziglang/zig/issues/13410 |
| | 3671 | if (f.liveness.isUnused(inst) or !inst_ty.hasRuntimeBits()) return CValue.none; |
| 3671 | | 3672 | |
| 3672 | const ty_op = f.air.instructions.items(.data)[inst].ty_op; | 3673 | const ty_op = f.air.instructions.items(.data)[inst].ty_op; |
| 3673 | const operand = try f.resolveInst(ty_op.operand); | 3674 | const operand = try f.resolveInst(ty_op.operand); |
| 3674 | | 3675 | |
| 3675 | const writer = f.object.writer(); | 3676 | const writer = f.object.writer(); |
| 3676 | const inst_ty = f.air.typeOfIndex(inst); | | |
| 3677 | if (inst_ty.isPtrAtRuntime() and | 3677 | if (inst_ty.isPtrAtRuntime() and |
| 3678 | f.air.typeOf(ty_op.operand).isPtrAtRuntime()) | 3678 | f.air.typeOf(ty_op.operand).isPtrAtRuntime()) |
| 3679 | { | 3679 | { |