coverage: Detect unused local file IDs to avoid an LLVM assertion

This case can't actually happen yet (other than via a testing flag), because
currently all of a function's spans must belong to the same file and expansion.
But this will be an important edge case when adding expansion region support.
This commit is contained in:
Zalathar
2025-05-09 20:57:17 +10:00
parent 8cd8b23b9e
commit 078144fdfa
8 changed files with 87 additions and 6 deletions

View File

@@ -1413,6 +1413,7 @@ pub mod parse {
"mcdc" => slot.level = CoverageLevel::Mcdc,
"no-mir-spans" => slot.no_mir_spans = true,
"discard-all-spans-in-codegen" => slot.discard_all_spans_in_codegen = true,
"inject-unused-local-file" => slot.inject_unused_local_file = true,
_ => return false,
}
}