diff options
| author | Zachary S <zasample18+github@gmail.com> | 2025-01-25 20:15:24 -0600 |
|---|---|---|
| committer | Zachary S <zasample18+github@gmail.com> | 2025-02-20 13:27:32 -0600 |
| commit | be635722bd4264f0fd0de4cccb9ca4f9f74fafd9 (patch) | |
| tree | 4b7af39ac714657ac8f7a44ebee73c49c0ec8e33 | |
| parent | 9ebb68ddda0247df044241daaf4856144c9c0998 (diff) | |
| download | rust-be635722bd4264f0fd0de4cccb9ca4f9f74fafd9.tar.gz rust-be635722bd4264f0fd0de4cccb9ca4f9f74fafd9.zip | |
Remove `BackendRepr::Uninhabited`, replaced with an `uninhabited: bool` field in `LayoutData`.
Also update comments that refered to BackendRepr::Uninhabited.
| -rw-r--r-- | src/intrinsic/mod.rs | 2 | ||||
| -rw-r--r-- | src/type_of.rs | 13 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/intrinsic/mod.rs b/src/intrinsic/mod.rs index 5322b731d8b..433868e238a 100644 --- a/src/intrinsic/mod.rs +++ b/src/intrinsic/mod.rs @@ -315,7 +315,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc let layout = self.layout_of(tp_ty).layout; let _use_integer_compare = match layout.backend_repr() { Scalar(_) | ScalarPair(_, _) => true, - Uninhabited | Vector { .. } => false, + Vector { .. } => false, Memory { .. } => { // For rusty ABIs, small aggregates are actually passed // as `RegKind::Integer` (see `FnAbi::adjust_for_abi`), diff --git a/src/type_of.rs b/src/type_of.rs index 8b8b54753e7..bac4fc51300 100644 --- a/src/type_of.rs +++ b/src/type_of.rs @@ -84,7 +84,7 @@ fn uncached_gcc_type<'gcc, 'tcx>( false, ); } - BackendRepr::Uninhabited | BackendRepr::Memory { .. } => {} + BackendRepr::Memory { .. } => {} } let name = match *layout.ty.kind() { @@ -179,19 +179,16 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> { fn is_gcc_immediate(&self) -> bool { match self.backend_repr { BackendRepr::Scalar(_) | BackendRepr::Vector { .. } => true, - BackendRepr::ScalarPair(..) | BackendRepr::Uninhabited | BackendRepr::Memory { .. } => { - false - } + BackendRepr::ScalarPair(..) | BackendRepr::Memory { .. } => false, } } fn is_gcc_scalar_pair(&self) -> bool { match self.backend_repr { BackendRepr::ScalarPair(..) => true, - BackendRepr::Uninhabited - | BackendRepr::Scalar(_) - | BackendRepr::Vector { .. } - | BackendRepr::Memory { .. } => false, + BackendRepr::Scalar(_) | BackendRepr::Vector { .. } | BackendRepr::Memory { .. } => { + false + } } } |
