diff options
author | Vedant Kumar <vsk@apple.com> | 2019-10-29 15:47:23 -0700 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2019-10-29 18:26:33 -0700 |
commit | bfed824b57d14e2ba98ddbaf1a1410cf04a3e279 (patch) | |
tree | ef8dc4694911d21ef423ad7c023fb4997b541be9 /llvm/tools/llvm-cov/CoverageReport.cpp | |
parent | 3b982b11f4e7c45c59ff80136efab7c116313e98 (diff) | |
download | bcm5719-llvm-bfed824b57d14e2ba98ddbaf1a1410cf04a3e279.tar.gz bcm5719-llvm-bfed824b57d14e2ba98ddbaf1a1410cf04a3e279.zip |
[llvm-cov] Add option to whitelist filenames
Add the `-whitelist-filename-regex` option to restrict coverage
reporting to file paths that match a whitelist regex.
Patch by Michael Daniels!
rdar://56720320
Diffstat (limited to 'llvm/tools/llvm-cov/CoverageReport.cpp')
-rw-r--r-- | llvm/tools/llvm-cov/CoverageReport.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-cov/CoverageReport.cpp b/llvm/tools/llvm-cov/CoverageReport.cpp index 82259542c59..805e465f99c 100644 --- a/llvm/tools/llvm-cov/CoverageReport.cpp +++ b/llvm/tools/llvm-cov/CoverageReport.cpp @@ -379,11 +379,11 @@ std::vector<FileCoverageSummary> CoverageReport::prepareFileReports( } void CoverageReport::renderFileReports( - raw_ostream &OS, const CoverageFilters &IgnoreFilenameFilters) const { + raw_ostream &OS, const FilenameCoverageFilters &FilenameFilters) const { std::vector<std::string> UniqueSourceFiles; for (StringRef SF : Coverage.getUniqueSourceFiles()) { - // Apply ignore source files filters. - if (!IgnoreFilenameFilters.matchesFilename(SF)) + // Apply source files filters. + if (FilenameFilters.matchesFilename(SF)) UniqueSourceFiles.emplace_back(SF.str()); } renderFileReports(OS, UniqueSourceFiles); |