Guard against unwinding in cleanup code
This commit is contained in:
parent
3cfa4def7c
commit
f74e8c7afc
3 changed files with 59 additions and 15 deletions
|
@ -62,6 +62,9 @@ pub struct FunctionCx<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> {
|
|||
/// Cached unreachable block
|
||||
unreachable_block: Option<Bx::BasicBlock>,
|
||||
|
||||
/// Cached double unwind guarding block
|
||||
double_unwind_guard: Option<Bx::BasicBlock>,
|
||||
|
||||
/// The location where each MIR arg/var/tmp/ret is stored. This is
|
||||
/// usually an `PlaceRef` representing an alloca, but not always:
|
||||
/// sometimes we can skip the alloca and just store the value
|
||||
|
@ -169,6 +172,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
|||
personality_slot: None,
|
||||
cached_llbbs,
|
||||
unreachable_block: None,
|
||||
double_unwind_guard: None,
|
||||
cleanup_kinds,
|
||||
landing_pads: IndexVec::from_elem(None, mir.basic_blocks()),
|
||||
funclets: IndexVec::from_fn_n(|_| None, mir.basic_blocks().len()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue