[Coverage][MCDC] Prepare MCDC Builder for pattern matching and llvm 19 by ZhuUx · Pull Request #126677 · rust-lang/rust (original) (raw)

It's not clear to me which parts of this are for LLVM 19, which parts are for pattern matching, and why they are combined in one PR.

The change for llvm 19 is group decision and its conditions to mcdc_spans so that we can calculate index of test vectors at extract_mcdc_mappings.
(At first I do it in mcdc.rs, but after I found that for loops also generate pattern matching decisions here I moved it to extract_mcdc_mappings, where decisions from for loops are removed due to span).

Is there some reason why the changes needed for LLVM 19 can't proceed separately from the changes needed for pattern matching?

No, actually they can be separated indeed as long as we separate degraded mcdc branches from mcdc spans early, as the change introduced at the last commit of this pr. So I worked on patches for llvm 19 based this.
Maybe we could make that separately for llvm 19?