diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-07-26 13:12:22 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-26 13:12:22 +0900 |
| commit | 3c1eef2e91dda0b97aa604e519ebb5fc98fbdbb2 (patch) | |
| tree | 0e9d01eeb36b94a2a8536d070480336b63c8ac89 /compiler/rustc_codegen_llvm/src/llvm/mod.rs | |
| parent | 2744c0ef182c5ba9320c62f2e5f01c076e4fd323 (diff) | |
| parent | 5f40a4f7a0aa6552e615fe89a6018e36c93f672e (diff) | |
| download | rust-3c1eef2e91dda0b97aa604e519ebb5fc98fbdbb2.tar.gz rust-3c1eef2e91dda0b97aa604e519ebb5fc98fbdbb2.zip | |
Rollup merge of #99711 - tmiasko:coverage, r=wesleywiser
Remove reachable coverage without counters
Remove reachable coverage without counters to maintain invariant that
either there is no coverage at all or there is a live coverage counter
left that provides the function source hash.
The motivating example would be a following closure:
```rust
let f = |x: bool| {
debug_assert!(x);
};
```
Which, with span changes from #93967, with disabled debug assertions,
after the final CFG simplifications but before removal of dead blocks,
gives rise to MIR:
```rust
fn main::{closure#0}(_1: &[closure@a.rs:2:13: 2:22], _2: bool) -> () {
debug x => _2;
let mut _0: ();
bb0: {
Coverage::Expression(4294967295) = 1 - 2;
return;
}
...
}
```
Which also makes the initial instrumentation quite suspect, although
this pull request doesn't attempt to address that aspect directly.
Fixes #98833.
r? ``@wesleywiser`` ``@richkadel``
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/mod.rs')
0 files changed, 0 insertions, 0 deletions
