[PATCH] D130745: [llvm-cov][WIP] Add Per Directory coverage to llvm-cov
Gulfem Savrun Yeniceri via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 5 08:06:13 PDT 2022
gulfem added a comment.
I have a few suggestions:
1. In the commit message, please add the link to https://llvm.org/reports/coverage/index.html after "An example is here".
2. I think you can introduce a flag into `llvm-cov` like `-per-directory-coverage` and enable this functionality when this flag is enabled.
================
Comment at: llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp:353
+ Dirs.try_emplace(
+ DirName,
+ new CoverageTreeNode{DirName, FileCoverageSummary{FCSPath}})
----------------
I think one potential problem here is that we can have the same folder name, e.g. `src` in separate sub-projects like in https://lab.llvm.org/coverage/coverage-reports/index.html:
```
libcxx/src/memory.cpp
libcxxabi/src/cxa_vector.cpp
```
Maybe, you can use `DirPath` in `Dirs` instead of `DirName` to make sure that it works in such cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130745/new/
https://reviews.llvm.org/D130745
More information about the llvm-commits
mailing list