[OCaml] PR22014: OCaml bindings didn't link to libLLVM-*.so with -Wl,--as-needed
[oota-llvm.git] / tools / llvm-cov / CoverageFilters.cpp
index 999a6bbb7474d7ed7f9648d1e1a88917c86cf3b7..325dd7235789a83e3c085a0078b05a5db2c0fb6f 100644 (file)
 
 using namespace llvm;
 
-bool NameCoverageFilter::matches(const FunctionCoverageMapping &Function) {
+bool NameCoverageFilter::matches(const coverage::FunctionRecord &Function) {
   StringRef FuncName = Function.Name;
   return FuncName.find(Name) != StringRef::npos;
 }
 
-bool NameRegexCoverageFilter::matches(const FunctionCoverageMapping &Function) {
+bool
+NameRegexCoverageFilter::matches(const coverage::FunctionRecord &Function) {
   return llvm::Regex(Regex).match(Function.Name);
 }
 
-bool RegionCoverageFilter::matches(const FunctionCoverageMapping &Function) {
+bool RegionCoverageFilter::matches(const coverage::FunctionRecord &Function) {
   return PassesThreshold(FunctionCoverageSummary::get(Function)
                              .RegionCoverage.getPercentCovered());
 }
 
-bool LineCoverageFilter::matches(const FunctionCoverageMapping &Function) {
+bool LineCoverageFilter::matches(const coverage::FunctionRecord &Function) {
   return PassesThreshold(
       FunctionCoverageSummary::get(Function).LineCoverage.getPercentCovered());
 }
@@ -40,7 +41,7 @@ void CoverageFilters::push_back(std::unique_ptr<CoverageFilter> Filter) {
   Filters.push_back(std::move(Filter));
 }
 
-bool CoverageFilters::matches(const FunctionCoverageMapping &Function) {
+bool CoverageFilters::matches(const coverage::FunctionRecord &Function) {
   for (const auto &Filter : Filters) {
     if (Filter->matches(Function))
       return true;
@@ -48,7 +49,8 @@ bool CoverageFilters::matches(const FunctionCoverageMapping &Function) {
   return false;
 }
 
-bool CoverageFiltersMatchAll::matches(const FunctionCoverageMapping &Function) {
+bool
+CoverageFiltersMatchAll::matches(const coverage::FunctionRecord &Function) {
   for (const auto &Filter : Filters) {
     if (!Filter->matches(Function))
       return false;