mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 13:05:18 +03:00
Reuse cleanup pad declared at start of block.
This commit is contained in:
@@ -59,11 +59,11 @@ fn get_landing_pad<'a>(&self, fcx: &FunctionContext<'a, 'tcx>) -> BasicBlockRef
|
||||
bcx.set_personality_fn(llpersonality);
|
||||
|
||||
if base::wants_msvc_seh(fcx.ccx.sess()) {
|
||||
// Insert cleanup instructions into the cleanup block
|
||||
let funclet = Some(Funclet::new(bcx.cleanup_pad(None, &[])));
|
||||
let pad = bcx.cleanup_pad(None, &[]);
|
||||
let funclet = Some(Funclet::new(pad));
|
||||
self.trans(funclet.as_ref(), &bcx);
|
||||
|
||||
bcx.cleanup_ret(bcx.cleanup_pad(None, &[]), None);
|
||||
bcx.cleanup_ret(pad, None);
|
||||
} else {
|
||||
// The landing pad return type (the type being propagated). Not sure
|
||||
// what this represents but it's determined by the personality
|
||||
|
||||
Reference in New Issue
Block a user