Remove eh_unwind_resume lang item

This commit is contained in:
Amanieu d'Antras 2020-01-27 06:10:10 +00:00
parent d73813ae62
commit f4f91f0b2f
24 changed files with 34 additions and 140 deletions

View file

@ -178,15 +178,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
let lp1 = bx.load_operand(lp1).immediate();
slot.storage_dead(&mut bx);
if !bx.sess().target.target.options.custom_unwind_resume {
let mut lp = bx.const_undef(self.landing_pad_type());
lp = bx.insert_value(lp, lp0, 0);
lp = bx.insert_value(lp, lp1, 1);
bx.resume(lp);
} else {
bx.call(bx.eh_unwind_resume(), &[lp0], helper.funclet(self));
bx.unreachable();
}
let mut lp = bx.const_undef(self.landing_pad_type());
lp = bx.insert_value(lp, lp0, 0);
lp = bx.insert_value(lp, lp1, 1);
bx.resume(lp);
}
}

View file

@ -14,7 +14,6 @@ pub trait MiscMethods<'tcx>: BackendTypes {
fn get_fn(&self, instance: Instance<'tcx>) -> Self::Function;
fn get_fn_addr(&self, instance: Instance<'tcx>) -> Self::Value;
fn eh_personality(&self) -> Self::Value;
fn eh_unwind_resume(&self) -> Self::Value;
fn sess(&self) -> &Session;
fn codegen_unit(&self) -> &Arc<CodegenUnit<'tcx>>;
fn used_statics(&self) -> &RefCell<Vec<Self::Value>>;