From c6538b70f5f0a5a1da8895c169c2cb9189148d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 30 Jan 2026 23:58:47 +0100 Subject: [PATCH] llvm: handle packed structs in C ABI integer promotion --- src/codegen/llvm.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 358d4ac469df1db0a3c7c8b507635f696797725e..26369d2ce98193f191a1d27fd96d58a569cc4fd3 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -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) { -- 2.54.0