[Orc] Add support for emitting indirect stubs directly into the JIT target's
[oota-llvm.git] / tools / llvm-cov / CoverageFilters.cpp
index 3732d729b6cacf560f4e97228e4f89d60d4c6baf..325dd7235789a83e3c085a0078b05a5db2c0fb6f 100644 (file)
 
 using namespace llvm;
 
-bool NameCoverageFilter::matches(const FunctionCoverageMapping &Function) {
-  StringRef FuncName = Function.PrettyName;
+bool NameCoverageFilter::matches(const coverage::FunctionRecord &Function) {
+  StringRef FuncName = Function.Name;
   return FuncName.find(Name) != StringRef::npos;
 }
 
-bool NameRegexCoverageFilter::matches(const FunctionCoverageMapping &Function) {
-  return llvm::Regex(Regex).match(Function.PrettyName);
+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;