Don't evaluate self.fn_can_unwind(...)
if can_unwind
is already true
This commit is contained in:
parent
835405199a
commit
e743eeb743
1 changed files with 4 additions and 3 deletions
|
@ -306,8 +306,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||||
check_abi(callee_abi)?;
|
check_abi(callee_abi)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let callee_can_unwind =
|
let can_unwind = can_unwind
|
||||||
self.fn_can_unwind(self.tcx.codegen_fn_attrs(callee_def_id).flags, callee_abi);
|
&& self
|
||||||
|
.fn_can_unwind(self.tcx.codegen_fn_attrs(callee_def_id).flags, callee_abi);
|
||||||
|
|
||||||
self.push_stack_frame(
|
self.push_stack_frame(
|
||||||
instance,
|
instance,
|
||||||
|
@ -315,7 +316,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||||
ret.map(|p| p.0),
|
ret.map(|p| p.0),
|
||||||
StackPopCleanup::Goto {
|
StackPopCleanup::Goto {
|
||||||
ret: ret.map(|p| p.1),
|
ret: ret.map(|p| p.1),
|
||||||
unwind: if can_unwind && callee_can_unwind {
|
unwind: if can_unwind {
|
||||||
StackPopUnwind::Cleanup(unwind)
|
StackPopUnwind::Cleanup(unwind)
|
||||||
} else {
|
} else {
|
||||||
StackPopUnwind::NotAllowed
|
StackPopUnwind::NotAllowed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue