1
Fork 0

Merge landing_pad and set_cleanup into cleanup_landing_pad

This commit is contained in:
bjorn3 2022-01-24 13:57:32 +01:00
parent 7a164509d3
commit f6ce771172
4 changed files with 21 additions and 30 deletions

View file

@ -1373,8 +1373,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
let llpersonality = self.cx.eh_personality();
let llretty = self.landing_pad_type();
let lp = bx.landing_pad(llretty, llpersonality, 1);
bx.set_cleanup(lp);
let lp = bx.cleanup_landing_pad(llretty, llpersonality);
let slot = self.get_personality_slot(&mut bx);
slot.storage_live(&mut bx);

View file

@ -424,13 +424,7 @@ pub trait BuilderMethods<'a, 'tcx>:
fn set_personality_fn(&mut self, personality: Self::Value);
// These are used by everyone except msvc
fn landing_pad(
&mut self,
ty: Self::Type,
pers_fn: Self::Value,
num_clauses: usize,
) -> Self::Value;
fn set_cleanup(&mut self, landing_pad: Self::Value);
fn cleanup_landing_pad(&mut self, ty: Self::Type, pers_fn: Self::Value) -> Self::Value;
fn resume(&mut self, exn: Self::Value);
// These are used only by msvc