zig
zig copied to clipboard
Sema: resolveStructLayout when use packed struct child type
Closes https://github.com/ziglang/zig/issues/13159
This may not be the best solution..
IMO the bug is the LLVM backend not handling the possibility of namespace like packed structs.
IMO the bug is the LLVM backend not handling the possibility of namespace like packed structs.
Indeed it is. another way, call resolveStructLayout in LLVM.dbg_var instead of Sema.field_val ?
another way, call resolveStructLayout in LLVM.dbg_var instead of Sema.field_val ?
Backends should not do any semantic analysis.
LLVM.dbg_var ignore backing_int_ty field if it is no_return ? (packed struct default init value)
lowerDebugTypeImpl
for packed structs should check haveFieldTypes
as is done for regular structs a few lines down.