@@ -1019,19 +1019,22 @@ void SourceCoverageViewHTML::renderLine(raw_ostream &OS, LineRef L,
1019
1019
// Just consider the segments which start *and* end on this line.
1020
1020
for (unsigned I = 0 , E = Segments.size () - 1 ; I < E; ++I) {
1021
1021
const auto *CurSeg = Segments[I];
1022
+ auto CurSegCount = BinaryCount (CurSeg->Count );
1023
+ auto LCSCount = BinaryCount (LCS.getExecutionCount ());
1022
1024
if (!CurSeg->IsRegionEntry )
1023
1025
continue ;
1024
- if (CurSeg-> Count == LCS. getExecutionCount () )
1026
+ if (CurSegCount == LCSCount )
1025
1027
continue ;
1026
1028
1027
1029
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" ),
1030
1033
" tooltip" );
1031
1034
1032
1035
if (getOptions ().Debug )
1033
1036
errs () << " Marker at " << CurSeg->Line << " :" << CurSeg->Col << " = "
1034
- << formatCount (CurSeg-> Count ) << " \n " ;
1037
+ << formatCount (CurSegCount ) << " \n " ;
1035
1038
}
1036
1039
}
1037
1040
@@ -1051,7 +1054,7 @@ void SourceCoverageViewHTML::renderLineCoverageColumn(
1051
1054
raw_ostream &OS, const LineCoverageStats &Line) {
1052
1055
std::string Count;
1053
1056
if (Line.isMapped ())
1054
- Count = tag (" pre" , formatCount (Line.getExecutionCount ()));
1057
+ Count = tag (" pre" , formatBinaryCount (Line.getExecutionCount ()));
1055
1058
std::string CoverageClass =
1056
1059
(Line.getExecutionCount () > 0 )
1057
1060
? " covered-line"
@@ -1106,7 +1109,7 @@ void SourceCoverageViewHTML::renderBranchView(raw_ostream &OS, BranchView &BRV,
1106
1109
1107
1110
OS << tag (" span" , Label, (Count ? " None" : " red branch" )) << " : " ;
1108
1111
if (getOptions ().ShowBranchCounts )
1109
- OS << tag (" span" , formatCount (Count),
1112
+ OS << tag (" span" , formatBinaryCount (Count),
1110
1113
(Count ? " covered-line" : " uncovered-line" ));
1111
1114
else
1112
1115
OS << format (" %0.2f" , (Total != 0 ? 100.0 * Count / Total : 0.0 )) << " %" ;
0 commit comments