diff options
author | Justin Bogner <mail@justinbogner.com> | 2014-01-29 21:31:45 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2014-01-29 21:31:45 +0000 |
commit | 84e7a35ca804f835b3d9bfd4250b28a1374c6627 (patch) | |
tree | 1c8fd9eb3cd1d099db5050ea67146370bcba17f7 /llvm/tools/llvm-cov/llvm-cov.cpp | |
parent | a99a3902a5c170a3ee184bd9e6efddd9dc604c9f (diff) | |
download | llvm-84e7a35ca804f835b3d9bfd4250b28a1374c6627.zip llvm-84e7a35ca804f835b3d9bfd4250b28a1374c6627.tar.gz llvm-84e7a35ca804f835b3d9bfd4250b28a1374c6627.tar.bz2 |
llvm-cov: Improve help message text
This Properly capitalizes and clarifies the help output from
llvm-cov. It also puts the llvm-only / non-gcov-compatible options in
their own category.
llvm-svn: 200418
Diffstat (limited to 'llvm/tools/llvm-cov/llvm-cov.cpp')
-rw-r--r-- | llvm/tools/llvm-cov/llvm-cov.cpp | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/llvm/tools/llvm-cov/llvm-cov.cpp b/llvm/tools/llvm-cov/llvm-cov.cpp index 177c99d..3f52f94 100644 --- a/llvm/tools/llvm-cov/llvm-cov.cpp +++ b/llvm/tools/llvm-cov/llvm-cov.cpp @@ -24,31 +24,30 @@ using namespace llvm; static cl::opt<std::string> SourceFile(cl::Positional, cl::Required, cl::desc("SOURCEFILE")); -static cl::opt<bool> -DumpGCOV("dump", cl::init(false), cl::desc("dump gcov file")); +static cl::opt<bool> AllBlocks("a", cl::init(false), + cl::desc("Display all basic blocks")); -static cl::opt<std::string> -InputGCNO("gcno", cl::desc("<input gcno file>"), cl::init("")); +static cl::opt<bool> BranchProb("b", cl::init(false), + cl::desc("Display branch probabilities")); -static cl::opt<std::string> -InputGCDA("gcda", cl::desc("<input gcda file>"), cl::init("")); +static cl::opt<bool> BranchCount("c", cl::init(false), + cl::desc("Display branch counts instead " + "of percentages (requires -b)")); -static cl::opt<bool> -AllBlocks("a", cl::init(false), cl::desc("display all block info")); +static cl::opt<bool> FuncSummary("f", cl::init(false), + cl::desc("Show coverage for each function")); -static cl::opt<bool> -BranchInfo("b", cl::init(false), cl::desc("display branch info")); +static cl::opt<bool> UncondBranch("u", cl::init(false), + cl::desc("Display unconditional branch info " + "(requires -b)")); -static cl::opt<bool> -BranchCount("c", cl::init(false), cl::desc("display branch counts instead of \ - probabilities (requires -b)")); - -static cl::opt<bool> -FuncCoverage("f", cl::init(false), cl::desc("output function coverage")); - -static cl::opt<bool> -UncondBranch("u", cl::init(false), cl::desc("display unconditional branch info \ - (requires -b)")); +static cl::OptionCategory DebugCat("Internal and debugging options"); +static cl::opt<bool> DumpGCOV("dump", cl::init(false), cl::cat(DebugCat), + cl::desc("Dump the gcov file to stderr")); +static cl::opt<std::string> InputGCNO("gcno", cl::cat(DebugCat), cl::init(""), + cl::desc("Override inferred gcno file")); +static cl::opt<std::string> InputGCDA("gcda", cl::cat(DebugCat), cl::init(""), + cl::desc("Override inferred gcda file")); //===----------------------------------------------------------------------===// int main(int argc, char **argv) { @@ -57,7 +56,7 @@ int main(int argc, char **argv) { PrettyStackTraceProgram X(argc, argv); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. - cl::ParseCommandLineOptions(argc, argv, "llvm coverage tool\n"); + cl::ParseCommandLineOptions(argc, argv, "LLVM code coverage tool\n"); if (InputGCNO.empty()) InputGCNO = SourceFile.substr(0, SourceFile.rfind(".")) + ".gcno"; @@ -91,7 +90,7 @@ int main(int argc, char **argv) { if (DumpGCOV) GF.dump(); - GCOVOptions Options(AllBlocks, BranchInfo, BranchCount, FuncCoverage, + GCOVOptions Options(AllBlocks, BranchProb, BranchCount, FuncSummary, UncondBranch); FileInfo FI(Options); GF.collectLineCounts(FI); |