Address Spaces: Implement in LLVM codegen

This commit is contained in:
Robin Voetter
2021-08-29 06:08:19 +02:00
parent e09465fc49
commit ea393b2bca
9 changed files with 91 additions and 21 deletions

View File

@@ -4873,7 +4873,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();