aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
diff options
context:
space:
mode:
authorSean Eveson <eveson.sean@gmail.com>2017-10-03 11:05:28 +0000
committerSean Eveson <eveson.sean@gmail.com>2017-10-03 11:05:28 +0000
commitd932b2d7631aea7a4788e49c8066759d7ac678e6 (patch)
tree2e775a1e6cf0d8be94167cc263bb31949eb4a604 /llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
parent90cc1b53d0ca1e614ee4b01e5264d3751f8953e1 (diff)
downloadllvm-d932b2d7631aea7a4788e49c8066759d7ac678e6.zip
llvm-d932b2d7631aea7a4788e49c8066759d7ac678e6.tar.gz
llvm-d932b2d7631aea7a4788e49c8066759d7ac678e6.tar.bz2
[llvm-cov] Hide files with no coverage from the index when filtering by name
Differential Revision: https://reviews.llvm.org/D38457 llvm-svn: 314782
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp')
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
index a031f18..b8fdf44 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
@@ -366,7 +366,8 @@ void CoveragePrinterHTML::emitFileSummary(raw_ostream &OS, StringRef SF,
Error CoveragePrinterHTML::createIndexFile(
ArrayRef<std::string> SourceFiles,
- const coverage::CoverageMapping &Coverage, const CoverageFilter &Filters) {
+ const coverage::CoverageMapping &Coverage,
+ const CoverageFiltersMatchAll &Filters) {
// Emit the default stylesheet.
auto CSSOrErr = createOutputStream("style", "css", /*InToplevel=*/true);
if (Error E = CSSOrErr.takeError())
@@ -419,7 +420,7 @@ Error CoveragePrinterHTML::createIndexFile(
// Emit links to files which don't contain any functions. These are normally
// not very useful, but could be relevant for code which abuses the
// preprocessor.
- if (EmptyFiles) {
+ if (EmptyFiles && Filters.empty()) {
OSRef << tag("p", "Files which contain no functions. (These "
"files contain code pulled into other files "
"by the preprocessor.)\n");