mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-20 19:04:10 -04:00
[llvm-cov] Suppress sub-line highlights in simple cases
llvm-cov tends to highlight too many regions because its policy is to highlight all region entry segments. This can look confusing to users: not all region entry segments are interesting and deserve highlighting. Emitting these highlights only when the region count differs from the line count is a more user-friendly policy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316109 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -563,6 +563,8 @@ void SourceCoverageViewHTML::renderLine(raw_ostream &OS, LineRef L,
|
||||
const auto *CurSeg = Segments[I];
|
||||
if (!CurSeg->IsRegionEntry)
|
||||
continue;
|
||||
if (CurSeg->Count == LCS.getExecutionCount())
|
||||
continue;
|
||||
|
||||
Snippets[I + 1] =
|
||||
tag("div", Snippets[I + 1] + tag("span", formatCount(CurSeg->Count),
|
||||
|
||||
Reference in New Issue
Block a user