Files
rust/tests/coverage/async/async_block.cov-map
Zalathar f521dd4ed9 Switch over to hybrid HIR-aware coverage spans
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.
2026-09-06 10:24:48 +10:00

33 lines
1.4 KiB
Plaintext

Function name: async_block::main
Raw bytes (26): 0x[01, 01, 01, 05, 01, 04, 01, 07, 01, 00, 0a, 01, 01, 0e, 00, 13, 02, 08, 09, 00, 23, 01, 02, 01, 00, 02]
Number of files: 1
- file 0 => $DIR/async_block.rs
Number of expressions: 1
- expression 0 operands: lhs = Counter(1), rhs = Counter(0)
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 7, 1) to (start + 0, 10)
- Code(Counter(0)) at (prev + 1, 14) to (start + 0, 19)
- Code(Expression(0, Sub)) at (prev + 8, 9) to (start + 0, 35)
= (c1 - c0)
- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2)
Highest counter ID seen: c0
Function name: async_block::main::{closure#0}
Raw bytes (41): 0x[01, 01, 01, 01, 05, 07, 01, 09, 1c, 00, 1d, 01, 01, 10, 00, 17, 05, 01, 11, 00, 19, 05, 00, 1a, 00, 1f, 02, 02, 11, 00, 19, 02, 00, 1a, 00, 21, 01, 02, 09, 00, 0a]
Number of files: 1
- file 0 => $DIR/async_block.rs
Number of expressions: 1
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 7
- Code(Counter(0)) at (prev + 9, 28) to (start + 0, 29)
- Code(Counter(0)) at (prev + 1, 16) to (start + 0, 23)
- Code(Counter(1)) at (prev + 1, 17) to (start + 0, 25)
- Code(Counter(1)) at (prev + 0, 26) to (start + 0, 31)
- Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 25)
= (c0 - c1)
- Code(Expression(0, Sub)) at (prev + 0, 26) to (start + 0, 33)
= (c0 - c1)
- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10)
Highest counter ID seen: c1