[llvm-cov] Don't create 'jump to ...' links in nested views

Doing so is pointless, since the whole view is usually visible in a
small amount of space.

llvm-svn: 281588
This commit is contained in:
Vedant Kumar
2016-09-15 06:44:48 +00:00
parent 6582669aa9
commit ea1e97b94c
2 changed files with 5 additions and 1 deletions

View File

@@ -601,7 +601,7 @@ void SourceCoverageViewHTML::renderTableHeader(raw_ostream &OS,
unsigned FirstUncoveredLineNo,
unsigned ViewDepth) {
std::string SourceLabel;
if (FirstUncoveredLineNo == 0) {
if (FirstUncoveredLineNo == 0 || ViewDepth > 0) {
SourceLabel = tag("td", tag("pre", "Source"));
} else {
std::string LinkTarget = "#L" + utostr(uint64_t(FirstUncoveredLineNo));