[cfe-dev] Absolute paths in code coverage info

Keith Smiley via cfe-dev cfe-dev at lists.llvm.org
Tue Jun 2 09:57:34 PDT 2020


Hey everyone,

Currently when generating code coverage by passing
`-fprofile-instr-generate -fcoverage-mapping` to clang, the __LLVM_COV /
__llvm_covmap section ends up containing absolute paths to the source files
being compiled. This causes issues when producing coverage info with remote
builds where the absolute paths to the source files may differ between
machines.

llvm-cov has a `-path-equivalence` flag in order for you to remap a single
absolute path from the coverage info which definitely helps, but it doesn't
solve this entirely for the cases where you have multiple paths that need
remapping, or you're using another tool such as, Xcode's code coverage UI,
that doesn't support this kind of path remapping.

I'm wondering if it has been discussed, or how feasible it would be, for me
to remove the necessity for absolute paths in this info.

Thanks!
--
Keith Smiley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200602/01c053a4/attachment.html>


More information about the cfe-dev mailing list