authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-04-30 12:14:02-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-04-30 12:14:02-07:00
log91b4729962ddec96d1ee60d742326da828dae94a
tree21cd0216869d9b34bc1b90d243df8635842538de
parentab086b62cf585aa7fa73f2df3332e87f60226f86

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.

1 files changed, 1 insertions(+), 1 deletions(-)

src/value.zig+1-1
......@@ -5390,7 +5390,7 @@ pub const Value = extern union {
53905390 /// have the same value, return that byte value, otherwise null.
53915391 pub fn hasRepeatedByteRepr(val: Value, ty: Type, mod: *Module, value_buffer: *Payload.U64) !?Value {
53925392 const target = mod.getTarget();
5393 const abi_size = ty.abiSize(target);
5393 const abi_size = std.math.cast(usize, ty.abiSize(target)) orelse return null;
53945394 assert(abi_size >= 1);
53955395 const byte_buffer = try mod.gpa.alloc(u8, abi_size);
53965396 defer mod.gpa.free(byte_buffer);