diff options
| author | gingerBill <bill@gingerbill.org> | 2022-08-12 13:48:10 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-08-12 13:48:10 +0100 |
| commit | 8e7c7eeebabcf81e6ca06e44ae8b98554addd142 (patch) | |
| tree | bd45472c32303fc778b84f6ec7c03e97327edcf1 /src/types.cpp | |
| parent | 22d16c20f8e446fb51d7faa14f22b9f86df8b393 (diff) | |
Fix `lb_emit_ptr_offset`
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/types.cpp b/src/types.cpp index cba27fd6f..56b310867 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -1115,7 +1115,7 @@ Type *alloc_type_simd_vector(i64 count, Type *elem, Type *generic_count=nullptr) //////////////////////////////////////////////////////////////// -Type *type_deref(Type *t) { +Type *type_deref(Type *t, bool allow_multi_pointer=false) { if (t != nullptr) { Type *bt = base_type(t); if (bt == nullptr) { @@ -1132,6 +1132,11 @@ Type *type_deref(Type *t) { GB_ASSERT(elem->kind == Type_Struct && elem->Struct.soa_kind != StructSoa_None); return elem->Struct.soa_elem; } + case Type_MultiPointer: + if (allow_multi_pointer) { + return bt->MultiPointer.elem; + } + break; } } return t; |