| author | |
| committer | |
| log | 67997a699a4a1ee20fb189f38077a4bb29c096b3 |
| tree | 0053cd5ea2ab1839e7e271693e78e314dae9c32d |
| parent | a84a8953257ccfb70567a75017c98830eca250e3 |
CBE was translating to access the `len` field rather than `ptr`.
Air.zig specifies that this operation is valid on a slice.1 files changed, 1 insertions(+), 1 deletions(-)
src/codegen/c.zig+1-1| ... | ... | @@ -5855,7 +5855,7 @@ fn airIntFromPtr(f: *Function, inst: Air.Inst.Index) !CValue { |
| 5855 | 5855 | try f.renderType(writer, inst_ty); |
| 5856 | 5856 | try writer.writeByte(')'); |
| 5857 | 5857 | if (operand_ty.isSlice(mod)) { |
| 5858 | try f.writeCValueMember(writer, operand, .{ .identifier = "len" }); | |
| 5858 | try f.writeCValueMember(writer, operand, .{ .identifier = "ptr" }); | |
| 5859 | 5859 | } else { |
| 5860 | 5860 | try f.writeCValue(writer, operand, .Other); |
| 5861 | 5861 | } |