aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov/SourceCoverageView.h
diff options
context:
space:
mode:
authorYuhao Gu <yhgu2000@outlook.com>2023-08-24 13:12:04 +0800
committerYuhao Gu <yhgu2000@outlook.com>2023-08-24 13:46:12 +0800
commitbea39c5443612b638aa1cc56d36e3b1fd06f6e96 (patch)
tree63bdf728f2bd4c184f7bbf3b9239e53945815829 /llvm/tools/llvm-cov/SourceCoverageView.h
parent7a41af86041bd757b7f380d7f645403d4e1725ca (diff)
downloadllvm-bea39c5443612b638aa1cc56d36e3b1fd06f6e96.zip
llvm-bea39c5443612b638aa1cc56d36e3b1fd06f6e96.tar.gz
llvm-bea39c5443612b638aa1cc56d36e3b1fd06f6e96.tar.bz2
[llvm-cov] Support directory layout in coverage reports
This is a GSoC 2023 project ([discourse link](https://discourse.llvm.org/t/coverage-support-a-hierarchical-directory-structure-in-generated-coverage-html-reports/68239)). llvm-cov currently generates a single top-level index HTML file, which causes rendering scalability issues in large projects. This patch adds support for hierarchical directory structure into the HTML reports to solve scalability issues by introducing the following changes: - Added a new command line option `--show-directory-coverage` for `llvm-cov show`. It works both for `--format=html` and `--format=text`. - Two new classes: `CoveragePrinterHTMLDirectory` and `CoveragePrinterTextDirectory` was added to support the new option. - A tool class `DirectoryCoverageReport` was added to support the two classes above. - Updated the document. - Added a new regression test for `--show-directory-coverage`. Reviewed By: phosek, gulfem Differential Revision: https://reviews.llvm.org/D151283
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.h')
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageView.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.h b/llvm/tools/llvm-cov/SourceCoverageView.h
index 5a9fcdd..c07595f 100644
--- a/llvm/tools/llvm-cov/SourceCoverageView.h
+++ b/llvm/tools/llvm-cov/SourceCoverageView.h
@@ -99,7 +99,7 @@ protected:
CoveragePrinter(const CoverageViewOptions &Opts) : Opts(Opts) {}
/// Return `OutputDir/ToplevelDir/Path.Extension`. If \p InToplevel is
- /// false, skip the ToplevelDir component. If \p Relative is false, skip the
+ /// true, skip the ToplevelDir component. If \p Relative is true, skip the
/// OutputDir component.
std::string getOutputPath(StringRef Path, StringRef Extension,
bool InToplevel, bool Relative = true) const;