Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for LLVM coverage mapping format versions 5 and 6 #91207

Merged
merged 2 commits into from
Dec 1, 2021

Commits on Nov 23, 2021

  1. Update CoverageMappingFormat Support to Version6

    Version 5 adds Branch Regions which are a prerequisite for branch coverage.
    Version 6 can use the zeroth filename as prefix for other relative files.
    Swatinem authored and richkadel committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    566ad8d View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2021

  1. Add conditional support for coverage map version 6

    This commit augments Swatinem's initial commit in uncommitted PR rust-lang#90047,
    which was a great starting point, but did not fully support LLVM
    Coverage Mapping Format version 6.
    
    Version 6 requires adding the compilation directory when file paths are
    relative, and since Rustc coverage maps use relative paths, we should
    add the expected compilation directory entry.
    
    Note, however, that with the compilation directory, coverage reports
    from `llvm-cov show` can now report file names (when the report includes
    more than one file) with the full absolute path to the file.
    
    This would be a problem for test results, but the workaround (for the
    rust coverage tests) is to include an additional `llvm-cov show`
    parameter: `--compilation-dir=.`
    richkadel committed Nov 30, 2021
    Configuration menu
    Copy the full SHA
    0c57fab View commit details
    Browse the repository at this point in the history