#ifndef LLVM_COV_COVERAGEFILTERS_H
#define LLVM_COV_COVERAGEFILTERS_H
-#include "FunctionCoverageMapping.h"
-#include <vector>
+#include "llvm/ProfileData/CoverageMapping.h"
#include <memory>
+#include <vector>
namespace llvm {
virtual ~CoverageFilter() {}
/// \brief Return true if the function passes the requirements of this filter.
- virtual bool matches(const FunctionCoverageMapping &Function) { return true; }
+ virtual bool matches(const coverage::FunctionRecord &Function) {
+ return true;
+ }
};
/// \brief Matches functions that contain a specific string in their name.
public:
NameCoverageFilter(StringRef Name) : Name(Name) {}
- bool matches(const FunctionCoverageMapping &Function) override;
+ bool matches(const coverage::FunctionRecord &Function) override;
};
/// \brief Matches functions whose name matches a certain regular expression.
public:
NameRegexCoverageFilter(StringRef Regex) : Regex(Regex) {}
- bool matches(const FunctionCoverageMapping &Function) override;
+ bool matches(const coverage::FunctionRecord &Function) override;
};
/// \brief Matches numbers that pass a certain threshold.
RegionCoverageFilter(Operation Op, double Threshold)
: StatisticThresholdFilter(Op, Threshold) {}
- bool matches(const FunctionCoverageMapping &Function) override;
+ bool matches(const coverage::FunctionRecord &Function) override;
};
/// \brief Matches functions whose line coverage percentage
LineCoverageFilter(Operation Op, double Threshold)
: StatisticThresholdFilter(Op, Threshold) {}
- bool matches(const FunctionCoverageMapping &Function) override;
+ bool matches(const coverage::FunctionRecord &Function) override;
};
/// \brief A collection of filters.
bool empty() const { return Filters.empty(); }
- bool matches(const FunctionCoverageMapping &Function) override;
+ bool matches(const coverage::FunctionRecord &Function) override;
};
/// \brief A collection of filters.
/// in an instance of this class.
class CoverageFiltersMatchAll : public CoverageFilters {
public:
- bool matches(const FunctionCoverageMapping &Function) override;
+ bool matches(const coverage::FunctionRecord &Function) override;
};
} // namespace llvm