From 08a0a3100389dc850729673e6591a539693c1fe0 Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Wed, 18 Oct 2017 18:52:28 +0000 Subject: [llvm-cov] Pass LineCoverageStats in SourceCoverageView. NFC. Instead of copying around the wrapped segment and the list of line segments, just pass a reference to a LineCoverageStats object. This simplifies the interface. It also makes an upcoming change to suppress distracting highlights possible. llvm-svn: 316108 --- llvm/tools/llvm-cov/SourceCoverageView.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'llvm/tools/llvm-cov/SourceCoverageView.cpp') diff --git a/llvm/tools/llvm-cov/SourceCoverageView.cpp b/llvm/tools/llvm-cov/SourceCoverageView.cpp index 337beb8..6cb4a2c 100644 --- a/llvm/tools/llvm-cov/SourceCoverageView.cpp +++ b/llvm/tools/llvm-cov/SourceCoverageView.cpp @@ -218,12 +218,11 @@ void SourceCoverageView::print(raw_ostream &OS, bool WholeFile, ExpansionColumn = NextESV->getStartCol(); // Display the source code for the current line. - renderLine(OS, {*LI, LI.line_number()}, LCI->getWrappedSegment(), - LCI->getLineSegments(), ExpansionColumn, ViewDepth); + renderLine(OS, {*LI, LI.line_number()}, *LCI, ExpansionColumn, ViewDepth); // Show the region markers. if (shouldRenderRegionMarkers(LCI->getLineSegments())) - renderRegionMarkers(OS, LCI->getLineSegments(), ViewDepth); + renderRegionMarkers(OS, *LCI, ViewDepth); // Show the expansions and instantiations for this line. bool RenderedSubView = false; @@ -235,9 +234,8 @@ void SourceCoverageView::print(raw_ostream &OS, bool WholeFile, // this subview. if (RenderedSubView) { ExpansionColumn = NextESV->getStartCol(); - renderExpansionSite(OS, {*LI, LI.line_number()}, - LCI->getWrappedSegment(), LCI->getLineSegments(), - ExpansionColumn, ViewDepth); + renderExpansionSite(OS, {*LI, LI.line_number()}, *LCI, ExpansionColumn, + ViewDepth); renderViewDivider(OS, ViewDepth + 1); } -- cgit v1.1