From 1963f51f14093fa036d1c6a06c4f10fc0a5e82c1 Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Sat, 14 Oct 2017 02:27:29 +0000 Subject: [llvm-cov] Factor out logic to iterate over line coverage stats (NFC) There were two copies of the logic needed to construct a line stats object for each line in a range: this patch brings it down to one. In the future, this will make it easier for IDE clients to display coverage in-line in source editors. To do that, we just need to move the new LineCoverageIterator class to libCoverage. llvm-svn: 315789 --- llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp') diff --git a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp index b8fdf44..40e194c 100644 --- a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp +++ b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp @@ -589,9 +589,9 @@ void SourceCoverageViewHTML::renderLineCoverageColumn( raw_ostream &OS, const LineCoverageStats &Line) { std::string Count = ""; if (Line.isMapped()) - Count = tag("pre", formatCount(Line.ExecutionCount)); + Count = tag("pre", formatCount(Line.getExecutionCount())); std::string CoverageClass = - (Line.ExecutionCount > 0) ? "covered-line" : "uncovered-line"; + (Line.getExecutionCount() > 0) ? "covered-line" : "uncovered-line"; OS << tag("td", Count, CoverageClass); } -- cgit v1.1