commit 38bd2bbcf27a34f232dd540534c3fb8063a0e24a (tree)
parent 9d8cdb855bd20f20d00618e8bc78dcf237232537
Author: Jacob Young <jacobly0@users.noreply.github.com>
Date: Sun, 2 Oct 2022 23:13:33 -0400
stage2: fix C ABI for bool
This fixes a miscompilation compiling debug zig with release stage3 zig.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
@@ -10277,6 +10277,7 @@ fn ccAbiPromoteInt(
else => {},
}
const int_info = switch (ty.zigTypeTag()) {
+ .Bool => Type.@"u1".intInfo(target),
.Int, .Enum, .ErrorSet => ty.intInfo(target),
else => return null,
};