summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/SourceCoverageView.h
diff options
context:
space:
mode:
authorYing Yi <maggieyi666@gmail.com>2016-09-06 19:31:18 +0000
committerYing Yi <maggieyi666@gmail.com>2016-09-06 19:31:18 +0000
commitd36b47c481c213f5b77fd2755b800ff9604866c0 (patch)
tree4a4fafc1e30100930c023e61c35f132bff40f15d /llvm/tools/llvm-cov/SourceCoverageView.h
parent19eeb37b8c23fb75b7777eb3821fa706b5d0aade (diff)
downloadbcm5719-llvm-d36b47c481c213f5b77fd2755b800ff9604866c0.tar.gz
bcm5719-llvm-d36b47c481c213f5b77fd2755b800ff9604866c0.zip
[llvm-cov] Add the "Go to first unexecuted line" feature.
This patch provides easy navigation to find the zero count lines, especially useful when the source file is very large. Differential Revision: https://reviews.llvm.org/D23277 llvm-svn: 280739
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.h')
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageView.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.h b/llvm/tools/llvm-cov/SourceCoverageView.h
index eb820e316b4..410c8fd1c26 100644
--- a/llvm/tools/llvm-cov/SourceCoverageView.h
+++ b/llvm/tools/llvm-cov/SourceCoverageView.h
@@ -175,6 +175,9 @@ class SourceCoverageView {
/// Specifies whether or not the view is a function view.
bool FunctionView;
+ /// Get the first uncovered line number for the source file.
+ unsigned getFirstUncoveredLineNo();
+
protected:
struct LineRef {
StringRef Line;
@@ -195,7 +198,8 @@ protected:
virtual void renderViewFooter(raw_ostream &OS) = 0;
/// \brief Render the source name for the view.
- virtual void renderSourceName(raw_ostream &OS, bool WholeFile) = 0;
+ virtual void renderSourceName(raw_ostream &OS, bool WholeFile,
+ unsigned FirstUncoveredLineNo) = 0;
/// \brief Render the line prefix at the given \p ViewDepth.
virtual void renderLinePrefix(raw_ostream &OS, unsigned ViewDepth) = 0;
OpenPOWER on IntegriCloud