mirror of
https://github.com/ziglang/zig.git
synced 2026-01-05 04:53:17 +00:00
stage1: Resolve LLVM C ABI type for small packed structs
Small packed structs weren't included in this resolution so their c_abi_type would be NULL when attempting usage later, leading to a compiler crash. Resolves #10431.
This commit is contained in:
parent
850b053ea6
commit
822c3a4819
@ -8962,7 +8962,7 @@ static void resolve_llvm_types_struct(CodeGen *g, ZigType *struct_type, ResolveS
|
||||
struct_type->data.structure.llvm_full_type_queue_index = SIZE_MAX;
|
||||
}
|
||||
|
||||
if (struct_type->abi_size <= 16 && struct_type->data.structure.layout == ContainerLayoutExtern)
|
||||
if (struct_type->abi_size <= 16 && (struct_type->data.structure.layout == ContainerLayoutExtern || struct_type->data.structure.layout == ContainerLayoutPacked))
|
||||
resolve_llvm_c_abi_type(g, struct_type);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user