mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 01:25:15 +00:00
Instead of trying to heuristically recover source-code spans from MIR soup, we can now take advantage of the `CoverageKind::Point` statements injected for specific HIR expressions. This is a transitional implementation that lets us remove the old MIR-soup code, but still relies heavily on the existing span-refinement heuristics, and does not take advantage of the full possibilities of HIR-aware coverage instrumentation. In order to avoid annoying never-executed spans in code that contains assertions, a heuristic has been added that ignores any expression within the arguments of a macro-expanded function call that returns `!`. Some coverage tests now require `//@ min-llvm-version: 23`, due to changes in how LLVM sorts the coverage mapping entries.
47 lines
2.0 KiB
Plaintext
47 lines
2.0 KiB
Plaintext
Function name: coverage_attr_closure::GLOBAL_CLOSURE_ON::{closure#0}
|
|
Raw bytes (24): 0x[01, 01, 00, 04, 01, 06, 0f, 00, 10, 01, 01, 05, 00, 0d, 01, 00, 10, 00, 15, 01, 01, 01, 00, 02]
|
|
Number of files: 1
|
|
- file 0 => $DIR/coverage_attr_closure.rs
|
|
Number of expressions: 0
|
|
Number of file 0 mappings: 4
|
|
- Code(Counter(0)) at (prev + 6, 15) to (start + 0, 16)
|
|
- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 13)
|
|
- Code(Counter(0)) at (prev + 0, 16) to (start + 0, 21)
|
|
- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
|
|
Highest counter ID seen: c0
|
|
|
|
Function name: coverage_attr_closure::contains_closures_off::{closure#0} (unused)
|
|
Raw bytes (24): 0x[01, 01, 00, 04, 00, 1d, 13, 00, 14, 00, 01, 09, 00, 11, 00, 00, 14, 00, 19, 00, 01, 05, 00, 06]
|
|
Number of files: 1
|
|
- file 0 => $DIR/coverage_attr_closure.rs
|
|
Number of expressions: 0
|
|
Number of file 0 mappings: 4
|
|
- Code(Zero) at (prev + 29, 19) to (start + 0, 20)
|
|
- Code(Zero) at (prev + 1, 9) to (start + 0, 17)
|
|
- Code(Zero) at (prev + 0, 20) to (start + 0, 25)
|
|
- Code(Zero) at (prev + 1, 5) to (start + 0, 6)
|
|
Highest counter ID seen: (none)
|
|
|
|
Function name: coverage_attr_closure::contains_closures_on
|
|
Raw bytes (14): 0x[01, 01, 00, 02, 01, 0f, 01, 00, 1a, 01, 09, 01, 00, 02]
|
|
Number of files: 1
|
|
- file 0 => $DIR/coverage_attr_closure.rs
|
|
Number of expressions: 0
|
|
Number of file 0 mappings: 2
|
|
- Code(Counter(0)) at (prev + 15, 1) to (start + 0, 26)
|
|
- Code(Counter(0)) at (prev + 9, 1) to (start + 0, 2)
|
|
Highest counter ID seen: c0
|
|
|
|
Function name: coverage_attr_closure::contains_closures_on::{closure#0} (unused)
|
|
Raw bytes (24): 0x[01, 01, 00, 04, 00, 11, 13, 00, 14, 00, 01, 09, 00, 11, 00, 00, 14, 00, 19, 00, 01, 05, 00, 06]
|
|
Number of files: 1
|
|
- file 0 => $DIR/coverage_attr_closure.rs
|
|
Number of expressions: 0
|
|
Number of file 0 mappings: 4
|
|
- Code(Zero) at (prev + 17, 19) to (start + 0, 20)
|
|
- Code(Zero) at (prev + 1, 9) to (start + 0, 17)
|
|
- Code(Zero) at (prev + 0, 20) to (start + 0, 25)
|
|
- Code(Zero) at (prev + 1, 5) to (start + 0, 6)
|
|
Highest counter ID seen: (none)
|
|
|