mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std.zig.llvm.Builder: fix writing u64 max constant for type bit_count > 64
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user