| ... | @@ -1583,7 +1583,7 @@ fn airStoreUndefined(f: *Function, dest_ptr: CValue, dest_type: Type) !CValue { | ... | @@ -1583,7 +1583,7 @@ fn airStoreUndefined(f: *Function, dest_ptr: CValue, dest_type: Type) !CValue { |
| 1583 | try writer.writeAll("));\n"); | 1583 | try writer.writeAll("));\n"); |
| 1584 | }, | 1584 | }, |
| 1585 | else => { | 1585 | else => { |
| 1586 | const indirection = if (dest_type.zigTypeTag() == .Array) "" else "*"; | 1586 | const indirection = if (dest_type.childType().zigTypeTag() == .Array) "" else "*"; |
| 1587 | | 1587 | |
| 1588 | try writer.writeAll("memset("); | 1588 | try writer.writeAll("memset("); |
| 1589 | try f.writeCValue(writer, dest_ptr); | 1589 | try f.writeCValue(writer, dest_ptr); |
| ... | @@ -1608,7 +1608,7 @@ fn airStore(f: *Function, inst: Air.Inst.Index) !CValue { | ... | @@ -1608,7 +1608,7 @@ fn airStore(f: *Function, inst: Air.Inst.Index) !CValue { |
| 1608 | return try airStoreUndefined(f, dest_ptr, lhs_type); | 1608 | return try airStoreUndefined(f, dest_ptr, lhs_type); |
| 1609 | | 1609 | |
| 1610 | // Don't check this for airStoreUndefined as that will work for arrays already | 1610 | // Don't check this for airStoreUndefined as that will work for arrays already |
| 1611 | if (lhs_type.zigTypeTag() == .Array) | 1611 | if (lhs_type.childType().zigTypeTag() == .Array) |
| 1612 | return f.fail("TODO: C backend: implement airStore for arrays", .{}); | 1612 | return f.fail("TODO: C backend: implement airStore for arrays", .{}); |
| 1613 | | 1613 | |
| 1614 | const writer = f.object.writer(); | 1614 | const writer = f.object.writer(); |