@@ -29,7 +29,6 @@ use rustc_middle::ty::layout::LayoutOf;
2929use rustc_middle:: ty:: { self , Instance , Ty } ;
3030use rustc_span:: { Span , Symbol , sym} ;
3131use rustc_target:: callconv:: { ArgAbi , PassMode } ;
32- use rustc_target:: spec:: PanicStrategy ;
3332
3433#[ cfg( feature = "master" ) ]
3534use crate :: abi:: FnAbiGccExt ;
@@ -694,7 +693,7 @@ impl<'gcc, 'tcx> ArgAbiExt<'gcc, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
694693 if self . is_sized_indirect ( ) {
695694 OperandValue :: Ref ( PlaceValue :: new_sized ( val, self . layout . align . abi ) ) . store ( bx, dst)
696695 } else if self . is_unsized_indirect ( ) {
697- bug ! ( "unsized `ArgAbi` must be handled through `store_fn_arg` " ) ;
696+ bug ! ( "unsized `ArgAbi` cannot be stored " ) ;
698697 } else if let PassMode :: Cast { ref cast, .. } = self . mode {
699698 // FIXME(eddyb): Figure out when the simpler Store is safe, clang
700699 // uses it for i16 -> {i8, i8}, but not for i24 -> {i8, i8, i8}.
@@ -735,6 +734,7 @@ impl<'gcc, 'tcx> ArgAbiExt<'gcc, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
735734 scratch_align,
736735 bx. const_usize ( self . layout . size . bytes ( ) ) ,
737736 MemFlags :: empty ( ) ,
737+ None ,
738738 ) ;
739739
740740 bx. lifetime_end ( scratch, scratch_size) ;
@@ -761,12 +761,7 @@ impl<'gcc, 'tcx> ArgAbiExt<'gcc, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
761761 OperandValue :: Pair ( next ( ) , next ( ) ) . store ( bx, dst) ;
762762 }
763763 PassMode :: Indirect { meta_attrs : Some ( _) , .. } => {
764- let place_val = PlaceValue {
765- llval : next ( ) ,
766- llextra : Some ( next ( ) ) ,
767- align : self . layout . align . abi ,
768- } ;
769- OperandValue :: Ref ( place_val) . store ( bx, dst) ;
764+ bug ! ( "unsized `ArgAbi` cannot be stored" ) ;
770765 }
771766 PassMode :: Direct ( _)
772767 | PassMode :: Indirect { meta_attrs : None , .. }
@@ -1303,7 +1298,7 @@ fn try_intrinsic<'a, 'b, 'gcc, 'tcx>(
13031298 _catch_func : RValue < ' gcc > ,
13041299 dest : PlaceRef < ' tcx , RValue < ' gcc > > ,
13051300) {
1306- if bx. sess ( ) . panic_strategy ( ) == PanicStrategy :: Abort {
1301+ if ! bx. sess ( ) . panic_strategy ( ) . unwinds ( ) {
13071302 bx. call ( bx. type_void ( ) , None , None , try_func, & [ data] , None , None ) ;
13081303 // Return 0 unconditionally from the intrinsic call;
13091304 // we can never unwind.
0 commit comments