mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Add support for using on relative pointers #670
This commit is contained in:
+7
-2
@@ -956,10 +956,15 @@ Type *alloc_type_simd_vector(i64 count, Type *elem) {
|
|||||||
Type *type_deref(Type *t) {
|
Type *type_deref(Type *t) {
|
||||||
if (t != nullptr) {
|
if (t != nullptr) {
|
||||||
Type *bt = base_type(t);
|
Type *bt = base_type(t);
|
||||||
if (bt == nullptr)
|
if (bt == nullptr) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (bt != nullptr && bt->kind == Type_Pointer)
|
}
|
||||||
|
if (bt != nullptr && bt->kind == Type_Pointer) {
|
||||||
return bt->Pointer.elem;
|
return bt->Pointer.elem;
|
||||||
|
}
|
||||||
|
if (bt != nullptr && bt->kind == Type_RelativePointer) {
|
||||||
|
return type_deref(bt->RelativePointer.pointer_type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user