[llvm] [llvm-cov] Coverage report HTML UI to jump between uncovered parts of code (PR #95662)
Hana Dusíková via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 16 12:52:30 PDT 2024
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/95662
>From 67b1ec357e9941bbb05f359fe3571998ba74601b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= <hanicka at hanicka.net>
Date: Sat, 15 Jun 2024 17:11:39 +0200
Subject: [PATCH] [llvm-cov] HTML generated code now contains JavaScript code
to quickly navigate between uncovered parts of code
---
llvm/docs/ReleaseNotes.rst | 6 +
.../llvm-cov/Inputs/showProjectSummary.test | 2 +-
.../llvm-cov/showLineExecutionCounts.cpp | 8 +-
.../llvm-cov/showTemplateInstantiations.cpp | 14 +-
llvm/tools/llvm-cov/SourceCoverageView.cpp | 3 +-
llvm/tools/llvm-cov/SourceCoverageView.h | 3 +-
.../tools/llvm-cov/SourceCoverageViewHTML.cpp | 216 ++++++++++++++++--
llvm/tools/llvm-cov/SourceCoverageViewHTML.h | 4 +-
.../tools/llvm-cov/SourceCoverageViewText.cpp | 3 +-
llvm/tools/llvm-cov/SourceCoverageViewText.h | 3 +-
10 files changed, 219 insertions(+), 43 deletions(-)
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index 5fdbc9f349af4..97f445d498dd0 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -292,6 +292,12 @@ Changes to the LLVM tools
now has a map for the mapped files. (`#92835
<https://github.com/llvm/llvm-project/pull/92835>`).
+* llvm-cov now generates HTML report with JavaScript code to allow simple
+ jumping between uncovered parts (lines/regions/branches) of code
+ using buttons on top-right corner of the page or using keys (L/R/B or
+ jumping in reverse direction with shift+L/R/B). (`#95662
+ <https://github.com/llvm/llvm-project/pull/95662>`).
+
Changes to LLDB
---------------------------------
diff --git a/llvm/test/tools/llvm-cov/Inputs/showProjectSummary.test b/llvm/test/tools/llvm-cov/Inputs/showProjectSummary.test
index eb0222677eaa5..5eb6b4e24d536 100644
--- a/llvm/test/tools/llvm-cov/Inputs/showProjectSummary.test
+++ b/llvm/test/tools/llvm-cov/Inputs/showProjectSummary.test
@@ -11,5 +11,5 @@ HTML-FILE: <pre>{{.*}}showProjectSummary.cpp</pre>
HTML-FUNCTION: <pre>main</pre>
HTML-HEADER: <td><pre>Line</pre></td>
HTML-HEADER: <td><pre>Count</pre></td>
-HTML-HEADER: <td><pre>Source (<a href='#L8'>jump to first uncovered line</a>)</pre></td>
+HTML-HEADER: <td><pre>Source</pre></td>
HTML-FOOTER: <h5>Generated by llvm-cov{{.*}}</h5>
diff --git a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
index 51ac3ae1deee5..f72a9978b8a73 100644
--- a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
+++ b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
@@ -44,11 +44,11 @@ int main() { // TEXT: [[@LINE]]| 161|int main(
// RUN: FileCheck -check-prefixes=HTML,HTML-WHOLE-FILE -input-file %t.html.dir/coverage/tmp/showLineExecutionCounts.cpp.html %s
// RUN: FileCheck -check-prefixes=HTML,HTML-FILTER -input-file %t.html.filtered.dir/coverage/tmp/showLineExecutionCounts.cpp.html %s
//
-// HTML-WHOLE-FILE: <td class='line-number'><a name='L4' href='#L4'><pre>4</pre></a></td><td class='uncovered-line'></td><td class='code'><pre>// before
-// HTML-FILTER-NOT: <td class='line-number'><a name='L4' href='#L4'><pre>4</pre></a></td><td class='uncovered-line'></td><td class='code'><pre>// before
+// HTML-WHOLE-FILE: <td class='line-number'><a name='L4' href='#L4'><pre>4</pre></a></td><td class='skipped-line'></td><td class='code'><pre>// before
+// HTML-FILTER-NOT: <td class='line-number'><a name='L4' href='#L4'><pre>4</pre></a></td><td class='skipped-line'></td><td class='code'><pre>// before
// HTML: <td class='line-number'><a name='L6' href='#L6'><pre>6</pre></a></td><td class='covered-line'><pre>161</pre></td><td class='code'><pre>int main() {
-// HTML-WHOLE-FILE: <td class='line-number'><a name='L26' href='#L26'><pre>26</pre></a></td><td class='uncovered-line'></td><td class='code'><pre>// after
-// HTML-FILTER-NOT: <td class='line-number'><a name='L26' href='#L26'><pre>26</pre></a></td><td class='uncovered-line'></td><td class='code'><pre>// after
+// HTML-WHOLE-FILE: <td class='line-number'><a name='L26' href='#L26'><pre>26</pre></a></td><td class='skipped-line'></td><td class='code'><pre>// after
+// HTML-FILTER-NOT: <td class='line-number'><a name='L26' href='#L26'><pre>26</pre></a></td><td class='skipped-line'></td><td class='code'><pre>// after
//
// Test index creation.
// RUN: FileCheck -check-prefix=TEXT-INDEX -input-file %t.dir/index.txt %s
diff --git a/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp b/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp
index 380e98b42bb8c..5d6318e3d1f31 100644
--- a/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp
+++ b/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp
@@ -45,9 +45,9 @@ int main() { // ALL: [[@LINE]]| 1|int main() {
// RUN: FileCheck -check-prefixes=HTML-SHARED,HTML-ALL -input-file=%t.html.dir/coverage/tmp/showTemplateInstantiations.cpp.html %s
// RUN: FileCheck -check-prefixes=HTML-SHARED,HTML-FILTER -input-file=%t.html.filtered.dir/coverage/tmp/showTemplateInstantiations.cpp.html %s
-// HTML-ALL: <td class='line-number'><a name='L4' href='#L4'><pre>4</pre></a></td><td class='uncovered-line'></td><td class='code'><pre>// before
-// HTML-FILTER-NOT: <td class='line-number'><a name='L4' href='#L4'><pre>4</pre></a></td><td class='uncovered-line'></td><td class='code'><pre>// before
-// HTML-ALL: <td class='line-number'><a name='L6' href='#L6'><pre>6</pre></a></td><td class='uncovered-line'></td><td class='code'><pre>template<typename T>
+// HTML-ALL: <td class='line-number'><a name='L4' href='#L4'><pre>4</pre></a></td><td class='skipped-line'></td><td class='code'><pre>// before
+// HTML-FILTER-NOT: <td class='line-number'><a name='L4' href='#L4'><pre>4</pre></a></td><td class='skipped-line'></td><td class='code'><pre>// before
+// HTML-ALL: <td class='line-number'><a name='L6' href='#L6'><pre>6</pre></a></td><td class='skipped-line'></td><td class='code'><pre>template<typename T>
// HTML-ALL: <div class='source-name-title'><pre>_Z4funcIiEiT_</pre></div>
// HTML-FILTER-NOT: <div class='source-name-title'><pre>_Z4funcIiEiT_</pre></div><table>
@@ -57,8 +57,12 @@ int main() { // ALL: [[@LINE]]| 1|int main() {
// HTML-SHARED: <td class='line-number'><a name='L7' href='#L7'><pre>7</pre></a></td><td class='covered-line'><pre>1</pre></td><td class='code'><pre>int func(T x) {
// RUN: FileCheck -check-prefix=HTML-JUMP -input-file=%t.html.dir/coverage/tmp/showTemplateInstantiations.cpp.html %s
-// HTML-JUMP: <pre>Source (<a href='#L{{[0-9]+}}'>jump to first uncovered line</a>)</pre>
-// HTML-JUMP-NOT: <pre>Source (<a href='#L{{[0-9]+}}'>jump to first uncovered line</a>)</pre>
+// HTML-JUMP: <a href='javascript:next_line()'>next uncovered line (L)</a>
+// HTML-JUMP-NOT: <a href='javascript:next_line()'>next uncovered line (L)</a>
+// HTML-JUMP: <a href='javascript:next_region()'>next uncovered region (R)</a>
+// HTML-JUMP-NOT: <a href='javascript:next_region()'>next uncovered region (R)</a>
+// HTML-JUMP: <a href='javascript:next_branch()'>next uncovered branch (B)</a>
+// HTML-JUMP-NOT: <a href='javascript:next_branch()'>next uncovered branch (B)</a>
// RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -show-instantiations=false -path-equivalence=/tmp,%S %s | FileCheck -check-prefix=NO_INSTS %s
// NO_INSTS-NOT: {{^ *}}| _Z4funcIbEiT_:
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.cpp b/llvm/tools/llvm-cov/SourceCoverageView.cpp
index 45bddd7284461..ce55e3abf23bd 100644
--- a/llvm/tools/llvm-cov/SourceCoverageView.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageView.cpp
@@ -203,8 +203,7 @@ void SourceCoverageView::print(raw_ostream &OS, bool WholeFile,
if (ShowSourceName)
renderSourceName(OS, WholeFile);
- renderTableHeader(OS, (ViewDepth > 0) ? 0 : getFirstUncoveredLineNo(),
- ViewDepth);
+ renderTableHeader(OS, ViewDepth);
// We need the expansions, instantiations, and branches sorted so we can go
// through them while we iterate lines.
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.h b/llvm/tools/llvm-cov/SourceCoverageView.h
index a874f7c6820d2..d255f8c200b24 100644
--- a/llvm/tools/llvm-cov/SourceCoverageView.h
+++ b/llvm/tools/llvm-cov/SourceCoverageView.h
@@ -262,8 +262,7 @@ class SourceCoverageView {
virtual void renderTitle(raw_ostream &OS, StringRef CellText) = 0;
/// Render the table header for a given source file.
- virtual void renderTableHeader(raw_ostream &OS, unsigned FirstUncoveredLineNo,
- unsigned IndentLevel) = 0;
+ virtual void renderTableHeader(raw_ostream &OS, unsigned IndentLevel) = 0;
/// @}
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
index d4b2ea3594fc5..b0bd3e0aa0401 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
@@ -88,6 +88,113 @@ const char *BeginHeader =
"<meta name='viewport' content='width=device-width,initial-scale=1'>"
"<meta charset='UTF-8'>";
+const char *JSForCoverage =
+ R"javascript(
+
+function next_uncovered(selector, reverse, scroll_selector) {
+ function visit_element(element) {
+ element.classList.add("seen");
+ element.classList.add("selected");
+
+ if (!scroll_selector) {
+ scroll_selector = "tr:has(.selected) td.line-number"
+ }
+
+ const scroll_to = document.querySelector(scroll_selector);
+ if (scroll_to) {
+ scroll_to.scrollIntoView({behavior: "smooth", block: "center", inline: "end"});
+ }
+
+ }
+
+ function select_one() {
+ if (!reverse) {
+ const previously_selected = document.querySelector(".selected");
+
+ if (previously_selected) {
+ previously_selected.classList.remove("selected");
+ }
+
+ return document.querySelector(selector + ":not(.seen)");
+ } else {
+ const previously_selected = document.querySelector(".selected");
+
+ if (previously_selected) {
+ previously_selected.classList.remove("selected");
+ previously_selected.classList.remove("seen");
+ }
+
+ const nodes = document.querySelectorAll(selector + ".seen");
+ if (nodes) {
+ const last = nodes[nodes.length - 1]; // last
+ return last;
+ } else {
+ return undefined;
+ }
+ }
+ }
+
+ function reset_all() {
+ if (!reverse) {
+ const all_seen = document.querySelectorAll(selector + ".seen");
+
+ if (all_seen) {
+ all_seen.forEach(e => e.classList.remove("seen"));
+ }
+ } else {
+ const all_seen = document.querySelectorAll(selector + ":not(.seen)");
+
+ if (all_seen) {
+ all_seen.forEach(e => e.classList.add("seen"));
+ }
+ }
+
+ }
+
+ const uncovered = select_one();
+
+ if (uncovered) {
+ visit_element(uncovered);
+ } else {
+ reset_all();
+
+
+ const uncovered = select_one();
+
+ if (uncovered) {
+ visit_element(uncovered);
+ }
+ }
+}
+
+function next_line(reverse) {
+ next_uncovered("td.uncovered-line", reverse)
+}
+
+function next_region(reverse) {
+ next_uncovered("span.red.region", reverse);
+}
+
+function next_branch(reverse) {
+ next_uncovered("span.red.branch", reverse);
+}
+
+document.addEventListener("keypress", function(event) {
+ console.log(event);
+ const reverse = event.shiftKey;
+ if (event.code == "KeyL") {
+ next_line(reverse);
+ }
+ if (event.code == "KeyB") {
+ next_branch(reverse);
+ }
+ if (event.code == "KeyR") {
+ next_region(reverse);
+ }
+
+});
+)javascript";
+
const char *CSSForCoverage =
R"(.red {
background-color: #f004;
@@ -95,6 +202,9 @@ const char *CSSForCoverage =
.cyan {
background-color: cyan;
}
+html {
+ scroll-behavior: smooth;
+}
body {
font-family: -apple-system, sans-serif;
}
@@ -171,6 +281,18 @@ table {
text-align: right;
color: #d00;
}
+.uncovered-line.selected {
+ color: #f00;
+ font-weight: bold;
+}
+.region.red.selected {
+ background-color: #f008;
+ font-weight: bold;
+}
+.branch.red.selected {
+ background-color: #f008;
+ font-weight: bold;
+}
.tooltip {
position: relative;
display: inline;
@@ -231,12 +353,19 @@ tr:hover {
tr:last-child {
border-bottom: none;
}
-tr:has(> td >a:target) {
- background-color: #50f6;
+tr:has(> td >a:target), tr:has(> td.uncovered-line.selected) {
+ background-color: #8884;
}
a {
color: inherit;
}
+.control {
+ position: fixed;
+ top: 0em;
+ right: 0em;
+ padding: 1em;
+ background: #FFF8;
+}
@media (prefers-color-scheme: dark) {
body {
background-color: #222;
@@ -254,6 +383,12 @@ a {
.tooltip {
background-color: #068;
}
+ .control {
+ background: #2228;
+ }
+ tr:has(> td >a:target), tr:has(> td.uncovered-line.selected) {
+ background-color: #8884;
+ }
}
)";
@@ -298,8 +433,18 @@ std::string getPathToStyle(StringRef ViewPath) {
return PathToStyle + "style.css";
}
+std::string getPathToJavaScript(StringRef ViewPath) {
+ std::string PathToJavaScript;
+ std::string PathSep = std::string(sys::path::get_separator());
+ unsigned NumSeps = ViewPath.count(PathSep);
+ for (unsigned I = 0, E = NumSeps; I < E; ++I)
+ PathToJavaScript += ".." + PathSep;
+ return PathToJavaScript + "control.js";
+}
+
void emitPrelude(raw_ostream &OS, const CoverageViewOptions &Opts,
- const std::string &PathToStyle = "") {
+ const std::string &PathToStyle = "",
+ const std::string &PathToJavaScript = "") {
OS << "<!doctype html>"
"<html>"
<< BeginHeader;
@@ -311,6 +456,13 @@ void emitPrelude(raw_ostream &OS, const CoverageViewOptions &Opts,
OS << "<link rel='stylesheet' type='text/css' href='"
<< escape(PathToStyle, Opts) << "'>";
+ // Link to a JavaScript if one is available
+ if (PathToJavaScript.empty())
+ ;
+ // OS << "<style>" << CSSForCoverage << "</style>";
+ else
+ OS << "<script src='" << escape(PathToJavaScript, Opts) << "'></script>";
+
OS << EndHeader << "<body>";
}
@@ -390,7 +542,8 @@ CoveragePrinterHTML::createViewFile(StringRef Path, bool InToplevel) {
emitPrelude(*OS.get(), Opts);
} else {
std::string ViewPath = getOutputPath(Path, "html", InToplevel);
- emitPrelude(*OS.get(), Opts, getPathToStyle(ViewPath));
+ emitPrelude(*OS.get(), Opts, getPathToStyle(ViewPath),
+ getPathToJavaScript(ViewPath));
}
return std::move(OS);
@@ -442,6 +595,17 @@ Error CoveragePrinterHTML::emitStyleSheet() {
return Error::success();
}
+Error CoveragePrinterHTML::emitJavaScript() {
+ auto JSOrErr = createOutputStream("control", "js", /*InToplevel=*/true);
+ if (Error E = JSOrErr.takeError())
+ return E;
+
+ OwnedStream JS = std::move(JSOrErr.get());
+ JS->operator<<(JSForCoverage);
+
+ return Error::success();
+}
+
void CoveragePrinterHTML::emitReportHeader(raw_ostream &OSRef,
const std::string &Title) {
// Emit some basic information about the coverage report.
@@ -487,6 +651,9 @@ Error CoveragePrinterHTML::createIndexFile(
if (Error E = emitStyleSheet())
return E;
+ if (Error E = emitJavaScript())
+ return E;
+
// Emit a file index along with some coverage statistics.
auto OSOrErr = createOutputStream("index", "html", /*InToplevel=*/true);
if (Error E = OSOrErr.takeError())
@@ -495,7 +662,7 @@ Error CoveragePrinterHTML::createIndexFile(
raw_ostream &OSRef = *OS.get();
assert(Opts.hasOutputDirectory() && "No output directory for index file");
- emitPrelude(OSRef, Opts, getPathToStyle(""));
+ emitPrelude(OSRef, Opts, getPathToStyle(""), getPathToJavaScript(""));
emitReportHeader(OSRef, "Coverage Report");
@@ -561,7 +728,8 @@ struct CoveragePrinterHTMLDirectory::Reporter : public DirectoryCoverageReport {
auto IndexHtmlPath = Printer.getOutputPath((LCPath + "index").str(), "html",
/*InToplevel=*/false);
- emitPrelude(OSRef, Options, getPathToStyle(IndexHtmlPath));
+ emitPrelude(OSRef, Options, getPathToStyle(IndexHtmlPath),
+ getPathToJavaScript(IndexHtmlPath));
auto NavLink = buildTitleLinks(LCPath);
Printer.emitReportHeader(OSRef, "Coverage Report (" + NavLink + ")");
@@ -800,7 +968,10 @@ void SourceCoverageViewHTML::renderLine(raw_ostream &OS, LineRef L,
auto Highlight = [&](const std::string &Snippet, unsigned LC, unsigned RC) {
if (getOptions().Debug)
HighlightedRanges.emplace_back(LC, RC);
- return tag("span", Snippet, std::string(*Color));
+ if (Snippet.empty())
+ return tag("span", Snippet, std::string(*Color));
+ else
+ return tag("span", Snippet, "region " + std::string(*Color));
};
auto CheckIfUncovered = [&](const CoverageSegment *S) {
@@ -883,7 +1054,9 @@ void SourceCoverageViewHTML::renderLineCoverageColumn(
if (Line.isMapped())
Count = tag("pre", formatCount(Line.getExecutionCount()));
std::string CoverageClass =
- (Line.getExecutionCount() > 0) ? "covered-line" : "uncovered-line";
+ (Line.getExecutionCount() > 0)
+ ? "covered-line"
+ : (Line.isMapped() ? "uncovered-line" : "skipped-line");
OS << tag("td", Count, CoverageClass);
}
@@ -957,7 +1130,7 @@ void SourceCoverageViewHTML::renderBranchView(raw_ostream &OS, BranchView &BRV,
}
// Display TrueCount or TruePercent.
- std::string TrueColor = R.ExecutionCount ? "None" : "red";
+ std::string TrueColor = R.ExecutionCount ? "None" : "red branch";
std::string TrueCovClass =
(R.ExecutionCount > 0) ? "covered-line" : "uncovered-line";
@@ -969,7 +1142,7 @@ void SourceCoverageViewHTML::renderBranchView(raw_ostream &OS, BranchView &BRV,
OS << format("%0.2f", TruePercent) << "%, ";
// Display FalseCount or FalsePercent.
- std::string FalseColor = R.FalseExecutionCount ? "None" : "red";
+ std::string FalseColor = R.FalseExecutionCount ? "None" : "red branch";
std::string FalseCovClass =
(R.FalseExecutionCount > 0) ? "covered-line" : "uncovered-line";
@@ -1053,24 +1226,21 @@ void SourceCoverageViewHTML::renderTitle(raw_ostream &OS, StringRef Title) {
if (getOptions().hasCreatedTime())
OS << tag(CreatedTimeTag,
escape(getOptions().CreatedTimeStr, getOptions()));
+
+ OS << tag("span",
+ a("javascript:next_line()", "next uncovered line (L)") + ", " +
+ a("javascript:next_region()", "next uncovered region (R)") +
+ ", " +
+ a("javascript:next_branch()", "next uncovered branch (B)"),
+ "control");
}
void SourceCoverageViewHTML::renderTableHeader(raw_ostream &OS,
- unsigned FirstUncoveredLineNo,
unsigned ViewDepth) {
- std::string SourceLabel;
- if (FirstUncoveredLineNo == 0) {
- SourceLabel = tag("td", tag("pre", "Source"));
- } else {
- std::string LinkTarget = "#L" + utostr(uint64_t(FirstUncoveredLineNo));
- SourceLabel =
- tag("td", tag("pre", "Source (" +
- a(LinkTarget, "jump to first uncovered line") +
- ")"));
- }
+ std::string Links;
renderLinePrefix(OS, ViewDepth);
- OS << tag("td", tag("pre", "Line")) << tag("td", tag("pre", "Count"))
- << SourceLabel;
+ OS << tag("td", tag("pre", "Line")) << tag("td", tag("pre", "Count"));
+ OS << tag("td", tag("pre", "Source" + Links));
renderLineSuffix(OS, ViewDepth);
}
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewHTML.h b/llvm/tools/llvm-cov/SourceCoverageViewHTML.h
index 32313a3963c43..9b7391d0043ec 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewHTML.h
+++ b/llvm/tools/llvm-cov/SourceCoverageViewHTML.h
@@ -38,6 +38,7 @@ class CoveragePrinterHTML : public CoveragePrinter {
protected:
Error emitStyleSheet();
+ Error emitJavaScript();
void emitReportHeader(raw_ostream &OSRef, const std::string &Title);
private:
@@ -105,8 +106,7 @@ class SourceCoverageViewHTML : public SourceCoverageView {
void renderTitle(raw_ostream &OS, StringRef Title) override;
- void renderTableHeader(raw_ostream &OS, unsigned FirstUncoveredLineNo,
- unsigned IndentLevel) override;
+ void renderTableHeader(raw_ostream &OS, unsigned IndentLevel) override;
public:
SourceCoverageViewHTML(StringRef SourceName, const MemoryBuffer &File,
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
index 580da45ecfc0d..cab60c2d9034e 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
@@ -414,5 +414,4 @@ void SourceCoverageViewText::renderTitle(raw_ostream &OS, StringRef Title) {
<< getOptions().CreatedTimeStr << "\n";
}
-void SourceCoverageViewText::renderTableHeader(raw_ostream &, unsigned,
- unsigned) {}
+void SourceCoverageViewText::renderTableHeader(raw_ostream &, unsigned) {}
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.h b/llvm/tools/llvm-cov/SourceCoverageViewText.h
index 7cb47fcbf42bd..25a161b096200 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewText.h
+++ b/llvm/tools/llvm-cov/SourceCoverageViewText.h
@@ -93,8 +93,7 @@ class SourceCoverageViewText : public SourceCoverageView {
void renderTitle(raw_ostream &OS, StringRef Title) override;
- void renderTableHeader(raw_ostream &OS, unsigned FirstUncoveredLineNo,
- unsigned IndentLevel) override;
+ void renderTableHeader(raw_ostream &OS, unsigned IndentLevel) override;
public:
SourceCoverageViewText(StringRef SourceName, const MemoryBuffer &File,
More information about the llvm-commits
mailing list