coverage: Remove unhelpful code for handling multiple files per function

Functions currently can't have mappings in multiple files, and if that ever
changes (e.g. to properly support expansion regions), this code will need to be
completely overhauled anyway.
This commit is contained in:
Zalathar
2024-11-04 14:53:52 +11:00
parent 3f9c54caf0
commit 996bdabc2a
11 changed files with 96 additions and 108 deletions

View File

@@ -138,7 +138,7 @@ pub(crate) struct CoverageSpan {
impl CoverageSpan {
pub(crate) fn from_source_region(file_id: u32, code_region: &SourceRegion) -> Self {
let &SourceRegion { file_name: _, start_line, start_col, end_line, end_col } = code_region;
let &SourceRegion { start_line, start_col, end_line, end_col } = code_region;
// Internally, LLVM uses the high bit of `end_col` to distinguish between
// code regions and gap regions, so it can't be used by the column number.
assert!(end_col & (1u32 << 31) == 0, "high bit of `end_col` must be unset: {end_col:#X}");