1
Fork 0

Remove BackendRepr::Uninhabited, replaced with an uninhabited: bool field in LayoutData.

Also update comments that refered to BackendRepr::Uninhabited.
This commit is contained in:
Zachary S 2025-01-25 20:15:24 -06:00
parent 28b83ee596
commit 7ba3d7b54e
26 changed files with 93 additions and 113 deletions

View file

@ -1558,8 +1558,11 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
return true;
};
if layout.uninhabited {
return true;
}
match layout.backend_repr {
BackendRepr::Uninhabited => true,
BackendRepr::Scalar(a) => !a.is_always_valid(&self.ecx),
BackendRepr::ScalarPair(a, b) => {
!a.is_always_valid(&self.ecx) || !b.is_always_valid(&self.ecx)