Skip to content

Commit 7aa8b32

Browse files
committed
Auto merge of #116304 - Zalathar:unreachable, r=cjgillot
coverage: Regression test for functions with unreachable bodies This is a regression test for the coverage issue that was addressed temporarily by #116166, and is tracked by #116171. --- If we instrument a function for coverage, but all of its counter-increment statements are removed by MIR optimizations, LLVM will think it isn't instrumented and it will disappear from coverage maps and coverage reports. Most MIR opts won't cause this because they tend not to remove statements from bb0, but `UnreachablePropagation` can do so if it sees that bb0 ends with `TerminatorKind::Unreachable`. Currently we have worked around this by turning off `UnreachablePropagation` when coverage instrumentation is enabled, which is why this test is able to pass. --- `@rustbot` label +A-code-coverage
2 parents 55e83ea + 9003095 commit 7aa8b32

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)