about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/counters.rs
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2023-09-10 16:35:37 +1000
committerZalathar <Zalathar@users.noreply.github.com>2023-10-18 21:20:29 +1100
commitc479bc7f3b8bb0441bef0634b0a60cfdd1ac0914 (patch)
tree09af7843a45c2cf0c61c9ec411bbcb7225e86557 /compiler/rustc_mir_transform/src/coverage/counters.rs
parent6d7160ce97f4bbbd44991a7325077e08214e0ce2 (diff)
downloadrust-c479bc7f3b8bb0441bef0634b0a60cfdd1ac0914.tar.gz
rust-c479bc7f3b8bb0441bef0634b0a60cfdd1ac0914.zip
coverage: Attach an optional `FunctionCoverageInfo` to `mir::Body`
This allows coverage information to be attached to the function as a whole when
appropriate, instead of being smuggled through coverage statements in the
function's basic blocks.

As an example, this patch moves the `function_source_hash` value out of
individual `CoverageKind::Counter` statements and into the per-function info.

When synthesizing unused functions for coverage purposes, the absence of this
info is taken to indicate that a function was not eligible for coverage and
should not be synthesized.
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/counters.rs')
0 files changed, 0 insertions, 0 deletions