diff options
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageViewText.cpp')
-rw-r--r-- | llvm/tools/llvm-cov/SourceCoverageViewText.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp index 51c6463db30..f5201d9c808 100644 --- a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp +++ b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp @@ -215,7 +215,12 @@ void SourceCoverageViewText::renderInstantiationView(raw_ostream &OS, unsigned ViewDepth) { renderLinePrefix(OS, ViewDepth); OS << ' '; - ISV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/true, ViewDepth); + if (!ISV.View) + getOptions().colored_ostream(OS, raw_ostream::RED) + << "Unexecuted instantiation: " << ISV.FunctionName << "\n"; + else + ISV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/true, + ViewDepth); } void SourceCoverageViewText::renderTitle(raw_ostream &OS, StringRef Title) { |