mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
fix compilation error on 32-bit LLVM-enabled compiler builds
Fixes a regression introduced in 9295355985202c267b4326b5a6e2ad5158b48e5d that caused 32-bit builds with `-Denable-llvm` to fail to build from source due to that common u64/usize casting issue.
This commit is contained in:
parent
ab086b62cf
commit
91b4729962
@ -5390,7 +5390,7 @@ pub const Value = extern union {
|
||||
/// have the same value, return that byte value, otherwise null.
|
||||
pub fn hasRepeatedByteRepr(val: Value, ty: Type, mod: *Module, value_buffer: *Payload.U64) !?Value {
|
||||
const target = mod.getTarget();
|
||||
const abi_size = ty.abiSize(target);
|
||||
const abi_size = std.math.cast(usize, ty.abiSize(target)) orelse return null;
|
||||
assert(abi_size >= 1);
|
||||
const byte_buffer = try mod.gpa.alloc(u8, abi_size);
|
||||
defer mod.gpa.free(byte_buffer);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user