diff options
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.cpp')
-rw-r--r-- | llvm/tools/llvm-cov/SourceCoverageView.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.cpp b/llvm/tools/llvm-cov/SourceCoverageView.cpp index 1965595..dc00b80 100644 --- a/llvm/tools/llvm-cov/SourceCoverageView.cpp +++ b/llvm/tools/llvm-cov/SourceCoverageView.cpp @@ -83,50 +83,6 @@ CoveragePrinter::create(const CoverageViewOptions &Opts) { llvm_unreachable("Unknown coverage output format!"); } -LineCoverageStats::LineCoverageStats( - ArrayRef<const coverage::CoverageSegment *> LineSegments, - const coverage::CoverageSegment *WrappedSegment) { - // Find the minimum number of regions which start in this line. - unsigned MinRegionCount = 0; - auto isStartOfRegion = [](const coverage::CoverageSegment *S) { - return !S->IsGapRegion && S->HasCount && S->IsRegionEntry; - }; - for (unsigned I = 0; I < LineSegments.size() && MinRegionCount < 2; ++I) - if (isStartOfRegion(LineSegments[I])) - ++MinRegionCount; - - bool StartOfSkippedRegion = !LineSegments.empty() && - !LineSegments.front()->HasCount && - LineSegments.front()->IsRegionEntry; - - ExecutionCount = 0; - HasMultipleRegions = MinRegionCount > 1; - Mapped = - !StartOfSkippedRegion && - ((WrappedSegment && WrappedSegment->HasCount) || (MinRegionCount > 0)); - - if (!Mapped) - return; - - // Pick the max count among regions which start and end on this line, to - // avoid erroneously using the wrapped count, and to avoid picking region - // counts which come from deferred regions. - if (LineSegments.size() > 1) { - for (unsigned I = 0; I < LineSegments.size() - 1; ++I) { - if (!LineSegments[I]->IsGapRegion) - ExecutionCount = std::max(ExecutionCount, LineSegments[I]->Count); - } - return; - } - - // If a non-gap region starts here, use its count. Otherwise use the wrapped - // count. - if (MinRegionCount == 1) - ExecutionCount = LineSegments[0]->Count; - else - ExecutionCount = WrappedSegment->Count; -} - unsigned SourceCoverageView::getFirstUncoveredLineNo() { const auto MinSegIt = find_if(CoverageInfo, [](const coverage::CoverageSegment &S) { |