Type: hack around isNoReturn queries for the remaining legacy tags

This commit is contained in:
Jacob Young 2023-05-20 15:42:21 -04:00 committed by Andrew Kelley
parent e4d498cd3a
commit 25cd4bb3c9

View File

@ -826,7 +826,7 @@ pub const Type = struct {
}
pub fn isNoReturn(ty: Type, mod: *Module) bool {
return mod.intern_pool.isNoReturn(ty.ip_index);
return if (ty.ip_index != .none) mod.intern_pool.isNoReturn(ty.ip_index) else false;
}
/// Returns 0 if the pointer is naturally aligned and the element type is 0-bit.