Skip to content

Commit be63572

Browse files
committed
Remove BackendRepr::Uninhabited, replaced with an uninhabited: bool field in LayoutData.
Also update comments that refered to BackendRepr::Uninhabited.
1 parent 9ebb68d commit be63572

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/intrinsic/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc
315315
let layout = self.layout_of(tp_ty).layout;
316316
let _use_integer_compare = match layout.backend_repr() {
317317
Scalar(_) | ScalarPair(_, _) => true,
318-
Uninhabited | Vector { .. } => false,
318+
Vector { .. } => false,
319319
Memory { .. } => {
320320
// For rusty ABIs, small aggregates are actually passed
321321
// as `RegKind::Integer` (see `FnAbi::adjust_for_abi`),

src/type_of.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn uncached_gcc_type<'gcc, 'tcx>(
8484
false,
8585
);
8686
}
87-
BackendRepr::Uninhabited | BackendRepr::Memory { .. } => {}
87+
BackendRepr::Memory { .. } => {}
8888
}
8989

9090
let name = match *layout.ty.kind() {
@@ -179,19 +179,16 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
179179
fn is_gcc_immediate(&self) -> bool {
180180
match self.backend_repr {
181181
BackendRepr::Scalar(_) | BackendRepr::Vector { .. } => true,
182-
BackendRepr::ScalarPair(..) | BackendRepr::Uninhabited | BackendRepr::Memory { .. } => {
183-
false
184-
}
182+
BackendRepr::ScalarPair(..) | BackendRepr::Memory { .. } => false,
185183
}
186184
}
187185

188186
fn is_gcc_scalar_pair(&self) -> bool {
189187
match self.backend_repr {
190188
BackendRepr::ScalarPair(..) => true,
191-
BackendRepr::Uninhabited
192-
| BackendRepr::Scalar(_)
193-
| BackendRepr::Vector { .. }
194-
| BackendRepr::Memory { .. } => false,
189+
BackendRepr::Scalar(_) | BackendRepr::Vector { .. } | BackendRepr::Memory { .. } => {
190+
false
191+
}
195192
}
196193
}
197194

0 commit comments

Comments
 (0)