@@ -289,16 +289,13 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
289289 bx. cleanup_ret ( funclet, None ) ;
290290 } else {
291291 let slot = self . get_personality_slot ( bx) ;
292- let lp0 = slot. project_field ( bx, 0 ) ;
293- let lp0 = bx. load_operand ( lp0 ) . immediate ( ) ;
294- let lp1 = slot. project_field ( bx, 1 ) ;
295- let lp1 = bx. load_operand ( lp1 ) . immediate ( ) ;
292+ let exn0 = slot. project_field ( bx, 0 ) ;
293+ let exn0 = bx. load_operand ( exn0 ) . immediate ( ) ;
294+ let exn1 = slot. project_field ( bx, 1 ) ;
295+ let exn1 = bx. load_operand ( exn1 ) . immediate ( ) ;
296296 slot. storage_dead ( bx) ;
297297
298- let mut lp = bx. const_undef ( self . landing_pad_type ( ) ) ;
299- lp = bx. insert_value ( lp, lp0, 0 ) ;
300- lp = bx. insert_value ( lp, lp1, 1 ) ;
301- bx. resume ( lp) ;
298+ bx. resume ( exn0, exn1) ;
302299 }
303300 }
304301
@@ -1636,24 +1633,17 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
16361633 let mut cleanup_bx = Bx :: build ( self . cx , cleanup_llbb) ;
16371634
16381635 let llpersonality = self . cx . eh_personality ( ) ;
1639- let llretty = self . landing_pad_type ( ) ;
1640- let lp = cleanup_bx. cleanup_landing_pad ( llretty, llpersonality) ;
1636+ let ( exn0, exn1) = cleanup_bx. cleanup_landing_pad ( llpersonality) ;
16411637
16421638 let slot = self . get_personality_slot ( & mut cleanup_bx) ;
16431639 slot. storage_live ( & mut cleanup_bx) ;
1644- Pair ( cleanup_bx. extract_value ( lp, 0 ) , cleanup_bx. extract_value ( lp, 1 ) )
1645- . store ( & mut cleanup_bx, slot) ;
1640+ Pair ( exn0, exn1) . store ( & mut cleanup_bx, slot) ;
16461641
16471642 cleanup_bx. br ( llbb) ;
16481643 cleanup_llbb
16491644 }
16501645 }
16511646
1652- fn landing_pad_type ( & self ) -> Bx :: Type {
1653- let cx = self . cx ;
1654- cx. type_struct ( & [ cx. type_i8p ( ) , cx. type_i32 ( ) ] , false )
1655- }
1656-
16571647 fn unreachable_block ( & mut self ) -> Bx :: BasicBlock {
16581648 self . unreachable_block . unwrap_or_else ( || {
16591649 let llbb = Bx :: append_block ( self . cx , self . llfn , "unreachable" ) ;
@@ -1673,8 +1663,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
16731663 self . set_debug_loc ( & mut bx, mir:: SourceInfo :: outermost ( self . mir . span ) ) ;
16741664
16751665 let llpersonality = self . cx . eh_personality ( ) ;
1676- let llretty = self . landing_pad_type ( ) ;
1677- bx. cleanup_landing_pad ( llretty, llpersonality) ;
1666+ bx. cleanup_landing_pad ( llpersonality) ;
16781667
16791668 let ( fn_abi, fn_ptr) = common:: build_langcall ( & bx, None , LangItem :: PanicNoUnwind ) ;
16801669 let fn_ty = bx. fn_decl_backend_type ( & fn_abi) ;
0 commit comments