]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_codegen_ssa/src/mir/analyze.rs
Rollup merge of #106244 - atouchet:readme3, r=workingjubilee
[rust.git] / compiler / rustc_codegen_ssa / src / mir / analyze.rs
index c7617d2e464fab1e7b867c373e3b20e23185bd47..dd1ac2c74aed4fe2d628ffc17958f407a3a0a461 100644 (file)
@@ -261,6 +261,9 @@ pub fn funclet_bb(self, for_bb: mir::BasicBlock) -> Option<mir::BasicBlock> {
     }
 }
 
+/// 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>,