|
@@ -94,12 +94,14 @@ void SourceCoverageViewText::renderViewDivider(raw_ostream &OS,
|
|
|
OS << '\n';
|
|
|
}
|
|
|
|
|
|
-void SourceCoverageViewText::renderLine(
|
|
|
- raw_ostream &OS, LineRef L,
|
|
|
- const coverage::CoverageSegment *WrappedSegment,
|
|
|
- CoverageSegmentArray Segments, unsigned ExpansionCol, unsigned ViewDepth) {
|
|
|
+void SourceCoverageViewText::renderLine(raw_ostream &OS, LineRef L,
|
|
|
+ const LineCoverageStats &LCS,
|
|
|
+ unsigned ExpansionCol,
|
|
|
+ unsigned ViewDepth) {
|
|
|
StringRef Line = L.Line;
|
|
|
unsigned LineNumber = L.LineNo;
|
|
|
+ auto *WrappedSegment = LCS.getWrappedSegment();
|
|
|
+ CoverageSegmentArray Segments = LCS.getLineSegments();
|
|
|
|
|
|
Optional<raw_ostream::Colors> Highlight;
|
|
|
SmallVector<std::pair<unsigned, unsigned>, 2> HighlightedRanges;
|
|
@@ -168,11 +170,14 @@ void SourceCoverageViewText::renderLineNumberColumn(raw_ostream &OS,
|
|
|
OS.indent(LineNumberColumnWidth - Str.size()) << Str << '|';
|
|
|
}
|
|
|
|
|
|
-void SourceCoverageViewText::renderRegionMarkers(
|
|
|
- raw_ostream &OS, CoverageSegmentArray Segments, unsigned ViewDepth) {
|
|
|
+void SourceCoverageViewText::renderRegionMarkers(raw_ostream &OS,
|
|
|
+ const LineCoverageStats &Line,
|
|
|
+ unsigned ViewDepth) {
|
|
|
renderLinePrefix(OS, ViewDepth);
|
|
|
OS.indent(getCombinedColumnWidth(getOptions()));
|
|
|
|
|
|
+ CoverageSegmentArray Segments = Line.getLineSegments();
|
|
|
+
|
|
|
// Just consider the segments which start *and* end on this line.
|
|
|
if (Segments.size() > 1)
|
|
|
Segments = Segments.drop_back();
|
|
@@ -196,12 +201,13 @@ void SourceCoverageViewText::renderRegionMarkers(
|
|
|
OS << '\n';
|
|
|
}
|
|
|
|
|
|
-void SourceCoverageViewText::renderExpansionSite(
|
|
|
- raw_ostream &OS, LineRef L, const coverage::CoverageSegment *WrappedSegment,
|
|
|
- CoverageSegmentArray Segments, unsigned ExpansionCol, unsigned ViewDepth) {
|
|
|
+void SourceCoverageViewText::renderExpansionSite(raw_ostream &OS, LineRef L,
|
|
|
+ const LineCoverageStats &LCS,
|
|
|
+ unsigned ExpansionCol,
|
|
|
+ unsigned ViewDepth) {
|
|
|
renderLinePrefix(OS, ViewDepth);
|
|
|
OS.indent(getCombinedColumnWidth(getOptions()) + (ViewDepth == 0 ? 0 : 1));
|
|
|
- renderLine(OS, L, WrappedSegment, Segments, ExpansionCol, ViewDepth);
|
|
|
+ renderLine(OS, L, LCS, ExpansionCol, ViewDepth);
|
|
|
}
|
|
|
|
|
|
void SourceCoverageViewText::renderExpansionView(raw_ostream &OS,
|