InternPool: fix build-exe and compiler-rt crashes

This commit is contained in:
Jacob Young
2023-05-26 18:56:31 -04:00
committed by Andrew Kelley
parent 9cd0ca9f48
commit 1dc01f1140
7 changed files with 191 additions and 92 deletions

View File

@@ -6898,10 +6898,6 @@ pub fn enumValueFieldIndex(mod: *Module, ty: Type, field_index: u32) Allocator.E
}
pub fn intValue(mod: *Module, ty: Type, x: anytype) Allocator.Error!Value {
if (std.debug.runtime_safety) {
const tag = ty.zigTypeTag(mod);
assert(tag == .Int or tag == .ComptimeInt);
}
if (std.math.cast(u64, x)) |casted| return intValue_u64(mod, ty, casted);
if (std.math.cast(i64, x)) |casted| return intValue_i64(mod, ty, casted);
var limbs_buffer: [4]usize = undefined;