Skip to content

Commit

Permalink
Rollup merge of rust-lang#105194 - tmiasko:cleanup-kinds, r=davidtwco
Browse files Browse the repository at this point in the history
Add comment to cleanup_kinds

based on the original commit message 1ae7ae0
  • Loading branch information
Yuki Okushi authored Jan 11, 2023
2 parents bf7ea0d + 836ef61 commit 8d7a06a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_codegen_ssa/src/mir/analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ impl CleanupKind {
}
}

/// MSVC requires unwinding code to be split to a tree of *funclets*, where each funclet can only
/// branch to itself or to its parent. Luckily, the code we generates matches this pattern.
/// Recover that structure in an analyze pass.
pub fn cleanup_kinds(mir: &mir::Body<'_>) -> IndexVec<mir::BasicBlock, CleanupKind> {
fn discover_masters<'tcx>(
result: &mut IndexVec<mir::BasicBlock, CleanupKind>,
Expand Down

0 comments on commit 8d7a06a

Please sign in to comment.