Skip to content

Commit 079abd0

Browse files
Reuse cleanup pad declared at start of block.
1 parent c1bc5e5 commit 079abd0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/librustc_trans/cleanup.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ impl<'tcx> DropValue<'tcx> {
5959
bcx.set_personality_fn(llpersonality);
6060

6161
if base::wants_msvc_seh(fcx.ccx.sess()) {
62-
// Insert cleanup instructions into the cleanup block
63-
let funclet = Some(Funclet::new(bcx.cleanup_pad(None, &[])));
62+
let pad = bcx.cleanup_pad(None, &[]);
63+
let funclet = Some(Funclet::new(pad));
6464
self.trans(funclet.as_ref(), &bcx);
6565

66-
bcx.cleanup_ret(bcx.cleanup_pad(None, &[]), None);
66+
bcx.cleanup_ret(pad, None);
6767
} else {
6868
// The landing pad return type (the type being propagated). Not sure
6969
// what this represents but it's determined by the personality

0 commit comments

Comments
 (0)