mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-21 11:38:28 +00:00
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281588 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0bcb8fb950
commit
2fcbfcf470
@ -83,3 +83,7 @@ int main() { // ALL: [[@LINE]]| 1|int main() {
|
||||
|
||||
// HTML-ALL: <td class='line-number'><a name='L[[@LINE-45]]'><pre>[[@LINE-45]]</pre></a></td><td class='uncovered-line'></td><td class='code'><pre>// after
|
||||
// HTML-FILTER-NOT: <td class='line-number'><a name='L[[@LINE-46]]'><pre>[[@LINE-46]]</pre></a></td><td class='uncovered-line'></td><td class='code'><pre>// after
|
||||
|
||||
// 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>
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user