mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
aro_translate_c: translate incomplete arrays
This commit is contained in:
parent
da3822f4c2
commit
e32cde2568
1 changed files with 9 additions and 1 deletions
|
|
@ -681,8 +681,16 @@ fn transType(c: *Context, scope: *Scope, raw_ty: Type, qual_handling: Type.QualH
|
|||
.float80 => return ZigTag.type.create(c.arena, "f80"),
|
||||
.float128 => return ZigTag.type.create(c.arena, "f128"),
|
||||
.@"enum" => @panic("TODO"),
|
||||
.pointer, .incomplete_array => @panic("todo"),
|
||||
.pointer => @panic("todo"),
|
||||
.unspecified_variable_len_array,
|
||||
.incomplete_array => {
|
||||
const child_type = ty.elemType();
|
||||
const is_const = child_type.qual.@"const";
|
||||
const is_volatile = child_type.qual.@"volatile";
|
||||
const elem_type = try transType(c, scope, child_type, qual_handling, source_loc);
|
||||
|
||||
return ZigTag.c_pointer.create(c.arena, .{ .is_const = is_const, .is_volatile = is_volatile, .elem_type = elem_type });
|
||||
},
|
||||
.array,
|
||||
.static_array,
|
||||
=> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue