diff options
author | Eli Friedman <efriedma@codeaurora.org> | 2017-09-11 22:56:20 +0000 |
---|---|---|
committer | Eli Friedman <efriedma@codeaurora.org> | 2017-09-11 22:56:20 +0000 |
commit | d3822e422b1fbdfe171a35c9091e0417fd390bfc (patch) | |
tree | d1a68b1e5d2e452904b32acff236be1a63395b1a /tools/llvm-cov/CodeCoverage.cpp | |
parent | 1a8b825606fb466013199bc7ee5d058e849dd2ec (diff) |
[llvm-cov] Allow hiding instantiation/region coverage from summary tables
Region coverage is difficult to explain without going deep into how
coverage is implemented. Instantiation coverage is easier to explain,
but probably not useful in most cases (templates don't exist in C, and
most C++ code contains relatively few templates).
This patch adds the options "-show-region-summary" and
"-show-instantiation-summary" to allow hiding those columns.
"-show-instantiation-summary" is turned off by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-cov/CodeCoverage.cpp')
-rw-r--r-- | tools/llvm-cov/CodeCoverage.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/llvm-cov/CodeCoverage.cpp b/tools/llvm-cov/CodeCoverage.cpp index 0e3d67e5691..5aa27e0181b 100644 --- a/tools/llvm-cov/CodeCoverage.cpp +++ b/tools/llvm-cov/CodeCoverage.cpp @@ -608,6 +608,15 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) { cl::list<std::string> DemanglerOpts( "Xdemangler", cl::desc("<demangler-path>|<demangler-option>")); + cl::opt<bool> RegionSummary( + "show-region-summary", cl::Optional, + cl::desc("Show region statistics in summary table"), + cl::init(true)); + + cl::opt<bool> InstantiationSummary( + "show-instantiation-summary", cl::Optional, + cl::desc("Show instantiation statistics in summary table")); + auto commandLineParser = [&, this](int argc, const char **argv) -> int { cl::ParseCommandLineOptions(argc, argv, "LLVM code coverage tool\n"); ViewOpts.Debug = DebugDump; @@ -718,6 +727,9 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) { ::exit(0); } + ViewOpts.ShowRegionSummary = RegionSummary; + ViewOpts.ShowInstantiationSummary = InstantiationSummary; + return 0; }; |