about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorRich Kadel <richkadel@google.com>2021-11-24 16:58:49 -0800
committerRich Kadel <richkadel@google.com>2021-11-30 13:54:53 -0800
commit0c57fab5fcd19244df6fa946bb504ce0601b29d1 (patch)
tree5d6b5c16a885b57e7ebebfbc287cd63434ffc6b3 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent566ad8da451a85ba2e45126cb7ad64f55450e31d (diff)
downloadrust-0c57fab5fcd19244df6fa946bb504ce0601b29d1.tar.gz
rust-0c57fab5fcd19244df6fa946bb504ce0601b29d1.zip
Add conditional support for coverage map version 6
This commit augments Swatinem's initial commit in uncommitted PR #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=.`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions