[llvm] r281590 - [llvm-cov] Move some layout logic to the right spot (NFC)
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 23:49:13 PDT 2016
Author: vedantk
Date: Thu Sep 15 01:49:13 2016
New Revision: 281590
URL: http://llvm.org/viewvc/llvm-project?rev=281590&view=rev
Log:
[llvm-cov] Move some layout logic to the right spot (NFC)
Modified:
llvm/trunk/tools/llvm-cov/SourceCoverageView.cpp
llvm/trunk/tools/llvm-cov/SourceCoverageViewHTML.cpp
Modified: llvm/trunk/tools/llvm-cov/SourceCoverageView.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/SourceCoverageView.cpp?rev=281590&r1=281589&r2=281590&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/SourceCoverageView.cpp (original)
+++ llvm/trunk/tools/llvm-cov/SourceCoverageView.cpp Thu Sep 15 01:49:13 2016
@@ -176,7 +176,8 @@ void SourceCoverageView::print(raw_ostre
if (ShowSourceName)
renderSourceName(OS, WholeFile);
- renderTableHeader(OS, getFirstUncoveredLineNo(), ViewDepth);
+ renderTableHeader(OS, (ViewDepth > 0) ? 0 : getFirstUncoveredLineNo(),
+ ViewDepth);
// We need the expansions and instantiations sorted so we can go through them
// while we iterate lines.
Modified: llvm/trunk/tools/llvm-cov/SourceCoverageViewHTML.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/SourceCoverageViewHTML.cpp?rev=281590&r1=281589&r2=281590&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/SourceCoverageViewHTML.cpp (original)
+++ llvm/trunk/tools/llvm-cov/SourceCoverageViewHTML.cpp Thu Sep 15 01:49:13 2016
@@ -609,7 +609,7 @@ void SourceCoverageViewHTML::renderTable
unsigned FirstUncoveredLineNo,
unsigned ViewDepth) {
std::string SourceLabel;
- if (FirstUncoveredLineNo == 0 || ViewDepth > 0) {
+ if (FirstUncoveredLineNo == 0) {
SourceLabel = tag("td", tag("pre", "Source"));
} else {
std::string LinkTarget = "#L" + utostr(uint64_t(FirstUncoveredLineNo));
More information about the llvm-commits
mailing list