@@ -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
@@ -1635,24 +1632,17 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
16351632 let mut cleanup_bx = Bx :: build ( self . cx , cleanup_llbb) ;
16361633
16371634 let llpersonality = self . cx . eh_personality ( ) ;
1638- let llretty = self . landing_pad_type ( ) ;
1639- let lp = cleanup_bx. cleanup_landing_pad ( llretty, llpersonality) ;
1635+ let ( exn0, exn1) = cleanup_bx. cleanup_landing_pad ( llpersonality) ;
16401636
16411637 let slot = self . get_personality_slot ( & mut cleanup_bx) ;
16421638 slot. storage_live ( & mut cleanup_bx) ;
1643- Pair ( cleanup_bx. extract_value ( lp, 0 ) , cleanup_bx. extract_value ( lp, 1 ) )
1644- . store ( & mut cleanup_bx, slot) ;
1639+ Pair ( exn0, exn1) . store ( & mut cleanup_bx, slot) ;
16451640
16461641 cleanup_bx. br ( llbb) ;
16471642 cleanup_llbb
16481643 }
16491644 }
16501645
1651- fn landing_pad_type ( & self ) -> Bx :: Type {
1652- let cx = self . cx ;
1653- cx. type_struct ( & [ cx. type_i8p ( ) , cx. type_i32 ( ) ] , false )
1654- }
1655-
16561646 fn unreachable_block ( & mut self ) -> Bx :: BasicBlock {
16571647 self . unreachable_block . unwrap_or_else ( || {
16581648 let llbb = Bx :: append_block ( self . cx , self . llfn , "unreachable" ) ;
@@ -1672,8 +1662,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
16721662 self . set_debug_loc ( & mut bx, mir:: SourceInfo :: outermost ( self . mir . span ) ) ;
16731663
16741664 let llpersonality = self . cx . eh_personality ( ) ;
1675- let llretty = self . landing_pad_type ( ) ;
1676- bx. cleanup_landing_pad ( llretty, llpersonality) ;
1665+ bx. cleanup_landing_pad ( llpersonality) ;
16771666
16781667 let ( fn_abi, fn_ptr) = common:: build_langcall ( & bx, None , LangItem :: PanicNoUnwind ) ;
16791668 let fn_ty = bx. fn_decl_backend_type ( & fn_abi) ;
0 commit comments