aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-09-20 17:32:52 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-09-20 17:32:52 -0700
commitf8b914fcf328b30f98d31bb6461c953e4b7a33a7 (patch)
tree06b74c36e25e94c1a8a5e384d289ffd556fdd4a9 /src/codegen.zig
parentabc30f79489b68f6dc0ee4b408c63a8e783215d1 (diff)
parent619260d94d68bdecdac649fa7b156dc8962a9889 (diff)
downloadzig-f8b914fcf328b30f98d31bb6461c953e4b7a33a7.tar.gz
zig-f8b914fcf328b30f98d31bb6461c953e4b7a33a7.zip
Merge branch 'address-space' of Snektron/zig into Snektron-address-space
There were two things to resolve here: * Snektron's branch edited Zir printing, but in master branch I moved the printing code from Zir.zig to print_zir.zig. So that just had to be moved over. * In master branch I fleshed out coerceInMemory a bit more, which caused one of Snektron's test cases to fail, so I had to add addrspace awareness to that. Once I did that the tests passed again.
Diffstat (limited to 'src/codegen.zig')
-rw-r--r--src/codegen.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.zig b/src/codegen.zig
index 2a33795d0f..bf2166d797 100644
--- a/src/codegen.zig
+++ b/src/codegen.zig
@@ -4895,7 +4895,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {
switch (typed_value.ty.zigTypeTag()) {
.Pointer => switch (typed_value.ty.ptrSize()) {
.Slice => {
- var buf: Type.Payload.ElemType = undefined;
+ var buf: Type.SlicePtrFieldTypeBuffer = undefined;
const ptr_type = typed_value.ty.slicePtrFieldType(&buf);
const ptr_mcv = try self.genTypedValue(.{ .ty = ptr_type, .val = typed_value.val });
const slice_len = typed_value.val.sliceLen();