@@ -1019,19 +1019,22 @@ void SourceCoverageViewHTML::renderLine(raw_ostream &OS, LineRef L,
10191019 // Just consider the segments which start *and* end on this line.
10201020 for (unsigned I = 0 , E = Segments.size () - 1 ; I < E; ++I) {
10211021 const auto *CurSeg = Segments[I];
1022+ auto CurSegCount = BinaryCount (CurSeg->Count );
1023+ auto LCSCount = BinaryCount (LCS.getExecutionCount ());
10221024 if (!CurSeg->IsRegionEntry )
10231025 continue ;
1024- if (CurSeg-> Count == LCS. getExecutionCount () )
1026+ if (CurSegCount == LCSCount )
10251027 continue ;
10261028
10271029 Snippets[I + 1 ] =
1028- tag (" div" , Snippets[I + 1 ] + tag (" span" , formatCount (CurSeg->Count ),
1029- " tooltip-content" ),
1030+ tag (" div" ,
1031+ Snippets[I + 1 ] +
1032+ tag (" span" , formatCount (CurSegCount), " tooltip-content" ),
10301033 " tooltip" );
10311034
10321035 if (getOptions ().Debug )
10331036 errs () << " Marker at " << CurSeg->Line << " :" << CurSeg->Col << " = "
1034- << formatCount (CurSeg-> Count ) << " \n " ;
1037+ << formatCount (CurSegCount ) << " \n " ;
10351038 }
10361039 }
10371040
@@ -1051,7 +1054,7 @@ void SourceCoverageViewHTML::renderLineCoverageColumn(
10511054 raw_ostream &OS, const LineCoverageStats &Line) {
10521055 std::string Count;
10531056 if (Line.isMapped ())
1054- Count = tag (" pre" , formatCount (Line.getExecutionCount ()));
1057+ Count = tag (" pre" , formatBinaryCount (Line.getExecutionCount ()));
10551058 std::string CoverageClass =
10561059 (Line.getExecutionCount () > 0 )
10571060 ? " covered-line"
@@ -1106,7 +1109,7 @@ void SourceCoverageViewHTML::renderBranchView(raw_ostream &OS, BranchView &BRV,
11061109
11071110 OS << tag (" span" , Label, (Count ? " None" : " red branch" )) << " : " ;
11081111 if (getOptions ().ShowBranchCounts )
1109- OS << tag (" span" , formatCount (Count),
1112+ OS << tag (" span" , formatBinaryCount (Count),
11101113 (Count ? " covered-line" : " uncovered-line" ));
11111114 else
11121115 OS << format (" %0.2f" , (Total != 0 ? 100.0 * Count / Total : 0.0 )) << " %" ;
0 commit comments