llvm: handle packed structs in C ABI integer promotion

This commit is contained in:
Alex Rønne Petersen 2026-01-30 23:58:47 +01:00
parent fa988e88ed
commit c6538b70f5
No known key found for this signature in database

View file

@ -12608,8 +12608,7 @@ fn ccAbiPromoteInt(cc: std.builtin.CallingConvention, zcu: *Zcu, ty: Type) ?std.
}
const int_info = switch (ty.zigTypeTag(zcu)) {
.bool => Type.u1.intInfo(zcu),
.int, .@"enum", .error_set => ty.intInfo(zcu),
else => return null,
else => if (ty.isAbiInt(zcu)) ty.intInfo(zcu) else return null,
};
return switch (target.os.tag) {
.driverkit, .ios, .maccatalyst, .macos, .watchos, .tvos, .visionos => switch (int_info.bits) {