Skip to content

Commit b5b58d1

Browse files
committed
Remove unreachable unsized arg handling in store_fn_arg/store_arg in codegen
1 parent 655a519 commit b5b58d1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/intrinsic/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ impl<'gcc, 'tcx> ArgAbiExt<'gcc, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
730730
if self.is_sized_indirect() {
731731
OperandValue::Ref(PlaceValue::new_sized(val, self.layout.align.abi)).store(bx, dst)
732732
} else if self.is_unsized_indirect() {
733-
bug!("unsized `ArgAbi` must be handled through `store_fn_arg`");
733+
bug!("unsized `ArgAbi` cannot be stored");
734734
} else if let PassMode::Cast { ref cast, .. } = self.mode {
735735
// FIXME(eddyb): Figure out when the simpler Store is safe, clang
736736
// uses it for i16 -> {i8, i8}, but not for i24 -> {i8, i8, i8}.
@@ -797,12 +797,7 @@ impl<'gcc, 'tcx> ArgAbiExt<'gcc, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
797797
OperandValue::Pair(next(), next()).store(bx, dst);
798798
}
799799
PassMode::Indirect { meta_attrs: Some(_), .. } => {
800-
let place_val = PlaceValue {
801-
llval: next(),
802-
llextra: Some(next()),
803-
align: self.layout.align.abi,
804-
};
805-
OperandValue::Ref(place_val).store(bx, dst);
800+
bug!("unsized `ArgAbi` cannot be stored");
806801
}
807802
PassMode::Direct(_)
808803
| PassMode::Indirect { meta_attrs: None, .. }

0 commit comments

Comments
 (0)