diff options
author | Yuchen Wu <yuchenericwu@hotmail.com> | 2013-12-18 18:40:15 +0000 |
---|---|---|
committer | Yuchen Wu <yuchenericwu@hotmail.com> | 2013-12-18 18:40:15 +0000 |
commit | 73dc38187b7de6d56f278d47a0ea9ff9ccbe0d7c (patch) | |
tree | 03d0879e55277f59b43d17e8dd01b0d83ecb572a /llvm/tools/llvm-cov/llvm-cov.cpp | |
parent | 59379524c89a7599f160c810be772e187a550fac (diff) | |
download | bcm5719-llvm-73dc38187b7de6d56f278d47a0ea9ff9ccbe0d7c.tar.gz bcm5719-llvm-73dc38187b7de6d56f278d47a0ea9ff9ccbe0d7c.zip |
llvm-cov: Added -c option for branch counts.
This will cause llvm-cov to output branch counts instead of branch
probabilities. -b must be enabled.
Also updated tests.
llvm-svn: 197594
Diffstat (limited to 'llvm/tools/llvm-cov/llvm-cov.cpp')
-rw-r--r-- | llvm/tools/llvm-cov/llvm-cov.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/tools/llvm-cov/llvm-cov.cpp b/llvm/tools/llvm-cov/llvm-cov.cpp index cd6ba183538..5372317005b 100644 --- a/llvm/tools/llvm-cov/llvm-cov.cpp +++ b/llvm/tools/llvm-cov/llvm-cov.cpp @@ -34,11 +34,15 @@ static cl::opt<bool> AllBlocks("a", cl::init(false), cl::desc("display all block info")); static cl::opt<bool> -BranchProb("b", cl::init(false), cl::desc("display branch info")); +BranchInfo("b", cl::init(false), cl::desc("display branch info")); + +static cl::opt<bool> +BranchCount("c", cl::init(false), cl::desc("display branch counts instead of \ + probabilities (requires -b)")); static cl::opt<bool> UncondBranch("u", cl::init(false), cl::desc("display unconditional branch info \ - (only works with -b)")); + (requires -b)")); //===----------------------------------------------------------------------===// int main(int argc, char **argv) { @@ -80,7 +84,7 @@ int main(int argc, char **argv) { if (DumpGCOV) GF.dump(); - GCOVOptions Options(AllBlocks, BranchProb, UncondBranch); + GCOVOptions Options(AllBlocks, BranchInfo, BranchCount, UncondBranch); FileInfo FI(Options); GF.collectLineCounts(FI); FI.print(InputGCNO, InputGCDA); |