diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-07-25 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-07-25 14:14:49 +0200 |
| commit | 5f40a4f7a0aa6552e615fe89a6018e36c93f672e (patch) | |
| tree | 9b60a65fee4fb440a11b88cb7edeaa0836b5bfb9 /compiler/rustc_codegen_llvm/src | |
| parent | 2f320a224e827b400be25966755a621779f797cc (diff) | |
| download | rust-5f40a4f7a0aa6552e615fe89a6018e36c93f672e.tar.gz rust-5f40a4f7a0aa6552e615fe89a6018e36c93f672e.zip | |
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;
}
...
}
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
