| ... | ... | @@ -5534,7 +5534,7 @@ fn airUnwrapErrUnionErr(f: *Function, inst: Air.Inst.Index) !CValue { |
| 5534 | 5534 | else |
| 5535 | 5535 | try f.writeCValueMember(writer, operand, .{ .identifier = "error" }) |
| 5536 | 5536 | else |
| 5537 | | try f.object.dg.renderValue(writer, error_ty, try mod.intValue(error_ty, 0), .Initializer); |
| 5537 | try f.object.dg.renderValue(writer, Type.err_int, try mod.intValue(Type.err_int, 0), .Initializer); |
| 5538 | 5538 | } |
| 5539 | 5539 | try writer.writeAll(";\n"); |
| 5540 | 5540 | return local; |
| ... | ... | @@ -5654,14 +5654,13 @@ fn airErrUnionPayloadPtrSet(f: *Function, inst: Air.Inst.Index) !CValue { |
| 5654 | 5654 | const operand = try f.resolveInst(ty_op.operand); |
| 5655 | 5655 | const error_union_ty = f.typeOf(ty_op.operand).childType(mod); |
| 5656 | 5656 | |
| 5657 | | const error_ty = error_union_ty.errorUnionSet(mod); |
| 5658 | 5657 | const payload_ty = error_union_ty.errorUnionPayload(mod); |
| 5659 | 5658 | |
| 5660 | 5659 | // First, set the non-error value. |
| 5661 | 5660 | if (!payload_ty.hasRuntimeBitsIgnoreComptime(mod)) { |
| 5662 | 5661 | try f.writeCValueDeref(writer, operand); |
| 5663 | 5662 | try writer.writeAll(" = "); |
| 5664 | | try f.object.dg.renderValue(writer, error_ty, try mod.intValue(error_ty, 0), .Other); |
| 5663 | try f.object.dg.renderValue(writer, Type.err_int, try mod.intValue(Type.err_int, 0), .Other); |
| 5665 | 5664 | try writer.writeAll(";\n "); |
| 5666 | 5665 | |
| 5667 | 5666 | return operand; |