mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 01:24:03 +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.
49 lines
2.2 KiB
Plaintext
49 lines
2.2 KiB
Plaintext
Function name: coroutine::get_u32
|
|
Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 0c, 01, 00, 2d, 01, 01, 08, 00, 0b, 05, 01, 09, 00, 0e, 02, 02, 09, 00, 28, 01, 02, 01, 00, 02]
|
|
Number of files: 1
|
|
- file 0 => $DIR/coroutine.rs
|
|
Number of expressions: 1
|
|
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
|
|
Number of file 0 mappings: 5
|
|
- Code(Counter(0)) at (prev + 12, 1) to (start + 0, 45)
|
|
- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 11)
|
|
- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 14)
|
|
- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 40)
|
|
= (c0 - c1)
|
|
- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2)
|
|
Highest counter ID seen: c1
|
|
|
|
Function name: coroutine::main
|
|
Raw bytes (53): 0x[01, 01, 02, 01, 05, 05, 09, 09, 01, 14, 01, 00, 0a, 01, 01, 13, 00, 2e, 01, 07, 0b, 00, 2e, 05, 01, 2b, 00, 2d, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 09, 01, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 02, 01, 00, 02]
|
|
Number of files: 1
|
|
- file 0 => $DIR/coroutine.rs
|
|
Number of expressions: 2
|
|
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
|
|
- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
|
|
Number of file 0 mappings: 9
|
|
- Code(Counter(0)) at (prev + 20, 1) to (start + 0, 10)
|
|
- Code(Counter(0)) at (prev + 1, 19) to (start + 0, 46)
|
|
- Code(Counter(0)) at (prev + 7, 11) to (start + 0, 46)
|
|
- Code(Counter(1)) at (prev + 1, 43) to (start + 0, 45)
|
|
- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 20)
|
|
= (c0 - c1)
|
|
- Code(Counter(1)) at (prev + 2, 11) to (start + 0, 46)
|
|
- Code(Counter(2)) at (prev + 1, 44) to (start + 0, 46)
|
|
- Code(Expression(1, Sub)) at (prev + 1, 14) to (start + 0, 20)
|
|
= (c1 - c2)
|
|
- Code(Counter(2)) at (prev + 2, 1) to (start + 0, 2)
|
|
Highest counter ID seen: c2
|
|
|
|
Function name: coroutine::main::{closure#0}
|
|
Raw bytes (24): 0x[01, 01, 00, 04, 01, 17, 08, 00, 09, 01, 01, 09, 00, 1f, 05, 01, 09, 00, 15, 05, 01, 05, 00, 06]
|
|
Number of files: 1
|
|
- file 0 => $DIR/coroutine.rs
|
|
Number of expressions: 0
|
|
Number of file 0 mappings: 4
|
|
- Code(Counter(0)) at (prev + 23, 8) to (start + 0, 9)
|
|
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 31)
|
|
- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 21)
|
|
- Code(Counter(1)) at (prev + 1, 5) to (start + 0, 6)
|
|
Highest counter ID seen: c1
|
|
|