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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200418 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Justin Bogner
2014-01-29 21:31:45 +00:00
parent 5119fd5e0f
commit c8662b128c

View File

@ -24,31 +24,30 @@ using namespace llvm;
static cl::opt<std::string> SourceFile(cl::Positional, cl::Required, static cl::opt<std::string> SourceFile(cl::Positional, cl::Required,
cl::desc("SOURCEFILE")); cl::desc("SOURCEFILE"));
static cl::opt<bool> static cl::opt<bool> AllBlocks("a", cl::init(false),
DumpGCOV("dump", cl::init(false), cl::desc("dump gcov file")); cl::desc("Display all basic blocks"));
static cl::opt<std::string> static cl::opt<bool> BranchProb("b", cl::init(false),
InputGCNO("gcno", cl::desc("<input gcno file>"), cl::init("")); cl::desc("Display branch probabilities"));
static cl::opt<std::string> static cl::opt<bool> BranchCount("c", cl::init(false),
InputGCDA("gcda", cl::desc("<input gcda file>"), cl::init("")); cl::desc("Display branch counts instead "
"of percentages (requires -b)"));
static cl::opt<bool> static cl::opt<bool> FuncSummary("f", cl::init(false),
AllBlocks("a", cl::init(false), cl::desc("display all block info")); cl::desc("Show coverage for each function"));
static cl::opt<bool> static cl::opt<bool> UncondBranch("u", cl::init(false),
BranchInfo("b", cl::init(false), cl::desc("display branch info")); cl::desc("Display unconditional branch info "
"(requires -b)"));
static cl::opt<bool> static cl::OptionCategory DebugCat("Internal and debugging options");
BranchCount("c", cl::init(false), cl::desc("display branch counts instead of \ static cl::opt<bool> DumpGCOV("dump", cl::init(false), cl::cat(DebugCat),
probabilities (requires -b)")); cl::desc("Dump the gcov file to stderr"));
static cl::opt<std::string> InputGCNO("gcno", cl::cat(DebugCat), cl::init(""),
static cl::opt<bool> cl::desc("Override inferred gcno file"));
FuncCoverage("f", cl::init(false), cl::desc("output function coverage")); static cl::opt<std::string> InputGCDA("gcda", cl::cat(DebugCat), cl::init(""),
cl::desc("Override inferred gcda file"));
static cl::opt<bool>
UncondBranch("u", cl::init(false), cl::desc("display unconditional branch info \
(requires -b)"));
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
int main(int argc, char **argv) { int main(int argc, char **argv) {
@ -57,7 +56,7 @@ int main(int argc, char **argv) {
PrettyStackTraceProgram X(argc, argv); PrettyStackTraceProgram X(argc, argv);
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. 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()) if (InputGCNO.empty())
InputGCNO = SourceFile.substr(0, SourceFile.rfind(".")) + ".gcno"; InputGCNO = SourceFile.substr(0, SourceFile.rfind(".")) + ".gcno";
@ -91,7 +90,7 @@ int main(int argc, char **argv) {
if (DumpGCOV) if (DumpGCOV)
GF.dump(); GF.dump();
GCOVOptions Options(AllBlocks, BranchInfo, BranchCount, FuncCoverage, GCOVOptions Options(AllBlocks, BranchProb, BranchCount, FuncSummary,
UncondBranch); UncondBranch);
FileInfo FI(Options); FileInfo FI(Options);
GF.collectLineCounts(FI); GF.collectLineCounts(FI);