aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWoze Parrot <wozeparrot@gmail.com>2021-01-11 21:40:07 -0500
committerAndrew Kelley <andrew@ziglang.org>2021-04-02 10:39:56 -0700
commit833f258297fddd699be48b125bcfd8511dc2b470 (patch)
tree0f20855eb571af5fb85855b765018f4e81d10564 /src
parent45db0e93a9bb34b638092924a7584010783dc119 (diff)
downloadzig-833f258297fddd699be48b125bcfd8511dc2b470.tar.gz
zig-833f258297fddd699be48b125bcfd8511dc2b470.zip
put async frame in correct addrspace
Diffstat (limited to 'src')
-rw-r--r--src/stage1/analyze.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stage1/analyze.cpp b/src/stage1/analyze.cpp
index d46faac2f0..d7535ed806 100644
--- a/src/stage1/analyze.cpp
+++ b/src/stage1/analyze.cpp
@@ -8723,7 +8723,9 @@ static void resolve_llvm_types_struct(CodeGen *g, ZigType *struct_type, ResolveS
assert(async_frame_type->id == ZigTypeIdFnFrame);
assert(field_type->id == ZigTypeIdFn);
resolve_llvm_types_fn(g, async_frame_type->data.frame.fn);
- llvm_type = LLVMPointerType(async_frame_type->data.frame.fn->raw_type_ref, 0);
+
+ const unsigned addrspace = ZigLLVMDataLayoutGetProgramAddressSpace(g->target_data_ref);
+ llvm_type = LLVMPointerType(async_frame_type->data.frame.fn->raw_type_ref, addrspace);
} else {
llvm_type = get_llvm_type(g, field_type);
}