diff options
author | Vedant Kumar <vsk@apple.com> | 2016-09-15 06:44:51 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2016-09-15 06:44:51 +0000 |
commit | 61f5694c30199046100164bb222cfb464ce4e06c (patch) | |
tree | f713926357900fa3ff867a4cb35c4fb131a90cfb /tools/llvm-cov/SourceCoverageViewHTML.cpp | |
parent | 2fcbfcf47019655dcaf6896c553ac0d3ac77b60a (diff) |
[llvm-cov] Hide instantiation views for unexecuted functions
Copying in the full text of the function doesn't help at all when we
already know that it's never executed. Just say that it's unexecuted --
the relevant source text has already been printed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281589 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-cov/SourceCoverageViewHTML.cpp')
-rw-r--r-- | tools/llvm-cov/SourceCoverageViewHTML.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/llvm-cov/SourceCoverageViewHTML.cpp b/tools/llvm-cov/SourceCoverageViewHTML.cpp index 0f176551550..31d6fd3048b 100644 --- a/tools/llvm-cov/SourceCoverageViewHTML.cpp +++ b/tools/llvm-cov/SourceCoverageViewHTML.cpp @@ -584,7 +584,15 @@ void SourceCoverageViewHTML::renderInstantiationView(raw_ostream &OS, InstantiationView &ISV, unsigned ViewDepth) { OS << BeginExpansionDiv; - ISV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/true, ViewDepth); + if (!ISV.View) + OS << BeginSourceNameDiv + << tag("pre", + escape("Unexecuted instantiation: " + ISV.FunctionName.str(), + getOptions())) + << EndSourceNameDiv; + else + ISV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/true, + ViewDepth); OS << EndExpansionDiv; } |