Skip to content
This repository was archived by the owner on Sep 2, 2018. It is now read-only.

Commit 4cb3509

Browse files
committed
[llvm-cov] Move some layout logic to the right spot (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281590 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 61f5694 commit 4cb3509

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tools/llvm-cov/SourceCoverageView.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ void SourceCoverageView::print(raw_ostream &OS, bool WholeFile,
176176
if (ShowSourceName)
177177
renderSourceName(OS, WholeFile);
178178

179-
renderTableHeader(OS, getFirstUncoveredLineNo(), ViewDepth);
179+
renderTableHeader(OS, (ViewDepth > 0) ? 0 : getFirstUncoveredLineNo(),
180+
ViewDepth);
180181

181182
// We need the expansions and instantiations sorted so we can go through them
182183
// while we iterate lines.

tools/llvm-cov/SourceCoverageViewHTML.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ void SourceCoverageViewHTML::renderTableHeader(raw_ostream &OS,
609609
unsigned FirstUncoveredLineNo,
610610
unsigned ViewDepth) {
611611
std::string SourceLabel;
612-
if (FirstUncoveredLineNo == 0 || ViewDepth > 0) {
612+
if (FirstUncoveredLineNo == 0) {
613613
SourceLabel = tag("td", tag("pre", "Source"));
614614
} else {
615615
std::string LinkTarget = "#L" + utostr(uint64_t(FirstUncoveredLineNo));

0 commit comments

Comments
 (0)