diff options
author | Vedant Kumar <vsk@apple.com> | 2017-10-14 02:27:29 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-10-14 02:27:29 +0000 |
commit | 1963f51f14093fa036d1c6a06c4f10fc0a5e82c1 (patch) | |
tree | 43365a45a401bb4c70d3d31646c262e43afebda6 /llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp | |
parent | 0eb929b08bc4f41433a93d863a19c2b6788bb871 (diff) | |
download | llvm-1963f51f14093fa036d1c6a06c4f10fc0a5e82c1.zip llvm-1963f51f14093fa036d1c6a06c4f10fc0a5e82c1.tar.gz llvm-1963f51f14093fa036d1c6a06c4f10fc0a5e82c1.tar.bz2 |
[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
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp')
-rw-r--r-- | llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |