std.zig.llvm.Builder: fix writing u64 max constant for type bit_count > 64

This commit is contained in:
Alex Rønne Petersen
2026-01-18 06:29:14 +01:00
parent 022fcc5869
commit 692bd03489
+2 -2
View File
@@ -13947,8 +13947,8 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
const bit_count = extra.type.scalarBits(self);
const val: i64 = if (bit_count <= 64)
bigint.toInt(i64) catch unreachable
else if (bigint.toInt(u64)) |val|
@bitCast(val)
else if (bigint.toInt(u63)) |val|
@bitCast(@as(u64, val))
else |_| {
const limbs = try record.addManyAsSlice(
self.gpa,