[PATCH] D95753: [CoverageMapping] Don't absolutize source paths

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 1 09:38:19 PST 2021


vsk added a comment.

For context, the reason abspaths are used here is because users don't expect coverage results to go missing if the build directory changes (e.g. given `cd A; cc x.c; cd ../B; cc x.c`, the expectation is that coverage for two distinct x.c's is reported).

I think it's important that this continues to work by default. Default-enabling the suggested `-fcoverage-mapping-abspath` option sounds like a workable solution. I haven't kept up with the work on -f(debug-)?compilation-dir, but if that option were specified, it could make sense to make coverage filenames "absolute" (relative to `chroot <compilation-dir>`).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95753/new/

https://reviews.llvm.org/D95753



More information about the cfe-commits mailing list