@@ -29,7 +29,6 @@ use rustc_middle::ty::layout::LayoutOf;
29
29
use rustc_middle:: ty:: { self , Instance , Ty } ;
30
30
use rustc_span:: { Span , Symbol , sym} ;
31
31
use rustc_target:: callconv:: { ArgAbi , PassMode } ;
32
- use rustc_target:: spec:: PanicStrategy ;
33
32
34
33
#[ cfg( feature = "master" ) ]
35
34
use crate :: abi:: FnAbiGccExt ;
@@ -694,7 +693,7 @@ impl<'gcc, 'tcx> ArgAbiExt<'gcc, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
694
693
if self . is_sized_indirect ( ) {
695
694
OperandValue :: Ref ( PlaceValue :: new_sized ( val, self . layout . align . abi ) ) . store ( bx, dst)
696
695
} else if self . is_unsized_indirect ( ) {
697
- bug ! ( "unsized `ArgAbi` must be handled through `store_fn_arg` " ) ;
696
+ bug ! ( "unsized `ArgAbi` cannot be stored " ) ;
698
697
} else if let PassMode :: Cast { ref cast, .. } = self . mode {
699
698
// FIXME(eddyb): Figure out when the simpler Store is safe, clang
700
699
// 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>> {
735
734
scratch_align,
736
735
bx. const_usize ( self . layout . size . bytes ( ) ) ,
737
736
MemFlags :: empty ( ) ,
737
+ None ,
738
738
) ;
739
739
740
740
bx. lifetime_end ( scratch, scratch_size) ;
@@ -761,12 +761,7 @@ impl<'gcc, 'tcx> ArgAbiExt<'gcc, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
761
761
OperandValue :: Pair ( next ( ) , next ( ) ) . store ( bx, dst) ;
762
762
}
763
763
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" ) ;
770
765
}
771
766
PassMode :: Direct ( _)
772
767
| PassMode :: Indirect { meta_attrs : None , .. }
@@ -1303,7 +1298,7 @@ fn try_intrinsic<'a, 'b, 'gcc, 'tcx>(
1303
1298
_catch_func : RValue < ' gcc > ,
1304
1299
dest : PlaceRef < ' tcx , RValue < ' gcc > > ,
1305
1300
) {
1306
- if bx. sess ( ) . panic_strategy ( ) == PanicStrategy :: Abort {
1301
+ if ! bx. sess ( ) . panic_strategy ( ) . unwinds ( ) {
1307
1302
bx. call ( bx. type_void ( ) , None , None , try_func, & [ data] , None , None ) ;
1308
1303
// Return 0 unconditionally from the intrinsic call;
1309
1304
// we can never unwind.
0 commit comments