coverage: Ignore functions that end up having no mappings
A used function with no mappings has historically indicated a bug, but that will no longer be the case after moving some fallible span-processing steps into codegen.
This commit is contained in:
parent
15b663e684
commit
619a272612
1 changed files with 2 additions and 9 deletions
|
@ -103,15 +103,8 @@ pub(crate) fn finalize(cx: &CodegenCx<'_, '_>) {
|
|||
encode_mappings_for_function(tcx, &global_file_table, &function_coverage);
|
||||
|
||||
if coverage_mapping_buffer.is_empty() {
|
||||
if function_coverage.is_used() {
|
||||
bug!(
|
||||
"A used function should have had coverage mapping data but did not: {}",
|
||||
mangled_function_name
|
||||
);
|
||||
} else {
|
||||
debug!("unused function had no coverage mapping data: {}", mangled_function_name);
|
||||
continue;
|
||||
}
|
||||
debug!("function has no mappings to embed; skipping");
|
||||
continue;
|
||||
}
|
||||
|
||||
if !is_used {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue