[llvm] r200419 - llvm-cov: Accept the long forms of gcov options

Justin Bogner mail at justinbogner.com
Wed Jan 29 13:31:47 PST 2014


Author: bogner
Date: Wed Jan 29 15:31:47 2014
New Revision: 200419

URL: http://llvm.org/viewvc/llvm-project?rev=200419&view=rev
Log:
llvm-cov: Accept the long forms of gcov options

This is a bit imperfect, as these options don't show up in the help as
is and single dash variants are accepted, which differs from gcov.
Unfortunately, this seems to be as good as it gets with the cl::opt
machinery, so it'll do as an incremental step.

Modified:
    llvm/trunk/tools/llvm-cov/llvm-cov.cpp

Modified: llvm/trunk/tools/llvm-cov/llvm-cov.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/llvm-cov.cpp?rev=200419&r1=200418&r2=200419&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/llvm-cov.cpp (original)
+++ llvm/trunk/tools/llvm-cov/llvm-cov.cpp Wed Jan 29 15:31:47 2014
@@ -26,20 +26,26 @@ static cl::opt<std::string> SourceFile(c
 
 static cl::opt<bool> AllBlocks("a", cl::init(false),
                                cl::desc("Display all basic blocks"));
+static cl::alias AllBlocksA("all-blocks", cl::aliasopt(AllBlocks));
 
 static cl::opt<bool> BranchProb("b", cl::init(false),
                                 cl::desc("Display branch probabilities"));
+static cl::alias BranchProbA("branch-probabilities", cl::aliasopt(BranchProb));
 
 static cl::opt<bool> BranchCount("c", cl::init(false),
                                  cl::desc("Display branch counts instead "
                                            "of percentages (requires -b)"));
+static cl::alias BranchCountA("branch-counts", cl::aliasopt(BranchCount));
 
 static cl::opt<bool> FuncSummary("f", cl::init(false),
                                  cl::desc("Show coverage for each function"));
+static cl::alias FuncSummaryA("function-summaries", cl::aliasopt(FuncSummary));
 
 static cl::opt<bool> UncondBranch("u", cl::init(false),
                                   cl::desc("Display unconditional branch info "
                                            "(requires -b)"));
+static cl::alias UncondBranchA("unconditional-branches",
+                               cl::aliasopt(UncondBranch));
 
 static cl::OptionCategory DebugCat("Internal and debugging options");
 static cl::opt<bool> DumpGCOV("dump", cl::init(false), cl::cat(DebugCat),





More information about the llvm-commits mailing list