mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-05 19:43:24 +00:00
51ddc74679
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 |
||
---|---|---|
.. | ||
assembly | ||
auxiliary | ||
codegen | ||
codegen-units | ||
coverage-map | ||
debuginfo | ||
incremental | ||
mir-opt | ||
pretty | ||
run-coverage | ||
run-coverage-rustdoc | ||
run-make | ||
run-make-fulldeps | ||
run-pass-valgrind | ||
rustdoc | ||
rustdoc-gui | ||
rustdoc-js | ||
rustdoc-js-std | ||
rustdoc-json | ||
rustdoc-ui | ||
ui | ||
ui-fulldeps | ||
COMPILER_TESTS.md |