aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov/CoverageFilters.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-cov/CoverageFilters.cpp')
-rw-r--r--llvm/tools/llvm-cov/CoverageFilters.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/tools/llvm-cov/CoverageFilters.cpp b/llvm/tools/llvm-cov/CoverageFilters.cpp
index fac7518d7da2..b7998647cc57 100644
--- a/llvm/tools/llvm-cov/CoverageFilters.cpp
+++ b/llvm/tools/llvm-cov/CoverageFilters.cpp
@@ -34,6 +34,13 @@ bool NameRegexCoverageFilter::matchesFilename(StringRef Filename) const {
return llvm::Regex(Regex).match(Filename);
}
+bool NameAllowlistCoverageFilter::matches(
+ const coverage::CoverageMapping &,
+ const coverage::FunctionRecord &Function) const {
+ return Allowlist.inSection("llvmcov", "allowlist_fun", Function.Name);
+}
+
+// TODO: remove this when -name-whitelist option is removed.
bool NameWhitelistCoverageFilter::matches(
const coverage::CoverageMapping &,
const coverage::FunctionRecord &Function) const {