This allows users to explicitly request relative paths with
-fdebug-compilation-dir ..
Fixes PR43614
Differential D68733
Use -fdebug-compilation-dir to form absolute paths in coverage mappings rnk on Oct 9 2019, 2:43 PM. Authored by
Details This allows users to explicitly request relative paths with Fixes PR43614
Diff Detail
Event TimelineComment Actions Thanks, lgtm! In PR43614 I mentioned adding an extra argument to llvm-cov to specify the base directory. On second thought, the existing -path-equivalence option should make that unnecessary.
Comment Actions I just tested out this CL, and I don't think it's working correctly (even with -path-equivalence flag) The command I used is: And the generated html files are as following: https://imgur.com/gallery/dlgQXhy
Am I using the -path-equivalence flag correctly? And any other suggestions to work this around? Comment Actions Hi @liaoyuke, thanks for trying this out.
I have a question about the option you passed: -path-equivalence=../..,<local-path>. If I read this patch correctly, the final coverage mapping will contain (what looks like) absolute paths which are just rooted at the debug compilation dir. So, why remap ../.. instead of <debug-compilation-dir>?
Interesting. Have you confirmed that the issue does not reproduce without -fdebug-compilation-dir/-path-equivalence?
Hm, actually this could be a bug in llvm-cov. Reading through the source, it looks like the path remapping is done before the exporter is created, but perhaps I've missed something.
|
Does the "[^/]" check work on Windows, or is something like "[^/\\]" necessary?