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/SourceCoverageViewText.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/tools/llvm-cov/SourceCoverageViewText.cpp') diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp index 261f08d7022..e4ac1fd5bfd 100644 --- a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp +++ b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp @@ -148,7 +148,7 @@ void SourceCoverageViewText::renderLineCoverageColumn( OS.indent(LineCoverageColumnWidth) << '|'; return; } - std::string C = formatCount(Line.ExecutionCount); + std::string C = formatCount(Line.getExecutionCount()); OS.indent(LineCoverageColumnWidth - C.size()); colored_ostream(OS, raw_ostream::MAGENTA, Line.hasMultipleRegions() && getOptions().Colors) -- cgit v1.2.3