diff options
| author | Robin Voetter <robin@voetter.nl> | 2021-08-27 02:48:29 +0200 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2021-09-20 02:29:04 +0200 |
| commit | e77fcf17301ad5a68e84cb598984a526cc356621 (patch) | |
| tree | 76f0b3a4649daa0fb088d0cccc2cab9b56a1adae /src/Sema.zig | |
| parent | 8672f2696f20e8989d42f69adbe09edfe5cd9332 (diff) | |
| download | zig-e77fcf17301ad5a68e84cb598984a526cc356621.tar.gz zig-e77fcf17301ad5a68e84cb598984a526cc356621.zip | |
Address Spaces: Implement right address space for slicing
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index dfcfde71cc..4b75cc4c43 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -9767,9 +9767,7 @@ fn analyzeSlice( return_elem_type, if (end_opt == .none) slice_sentinel else null, 0, // TODO alignment - // TODO(Snektron) address space, should be inferred from the pointer type. - // TODO(Snektron) address space for slicing a local, should compute address space from context and architecture. - .generic, + if (ptr_child.zigTypeTag() == .Pointer) ptr_child.ptrAddressSpace() else .generic, 0, 0, !ptr_child.isConstPtr(), |
