X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_codegen_ssa%2Fsrc%2Fmir%2Fanalyze.rs;h=dd1ac2c74aed4fe2d628ffc17958f407a3a0a461;hb=7e6f42e688b4e1713533f369b54df19ea7aca104;hp=c7617d2e464fab1e7b867c373e3b20e23185bd47;hpb=cb8fdff56da1b72ab942e41dc213059d83b58456;p=rust.git diff --git a/compiler/rustc_codegen_ssa/src/mir/analyze.rs b/compiler/rustc_codegen_ssa/src/mir/analyze.rs index c7617d2e464..dd1ac2c74ae 100644 --- a/compiler/rustc_codegen_ssa/src/mir/analyze.rs +++ b/compiler/rustc_codegen_ssa/src/mir/analyze.rs @@ -261,6 +261,9 @@ pub fn funclet_bb(self, for_bb: mir::BasicBlock) -> Option { } } +/// 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 { fn discover_masters<'tcx>( result: &mut IndexVec,