Skip to content

Commit

Permalink
get_pointee_type will decay unsized array types now
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugobros3 committed Jan 18, 2024
1 parent fd3df2e commit 3f76364
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/shady/type_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ const Type* get_pointee_type(IrArena* arena, const Type* type) {
assert(type->tag == PtrType_TAG);
uniform &= is_addr_space_uniform(arena, type->payload.ptr_type.address_space);
type = type->payload.ptr_type.pointed_type;
while (type->tag == ArrType_TAG && !type->payload.arr_type.size)
type = type->payload.arr_type.element_type;

if (qualified)
type = qualified_type(arena, (QualifiedType) {
.type = type,
Expand Down

0 comments on commit 3f76364

Please sign in to comment.