summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorYuchen Wu <yuchenericwu@hotmail.com>2013-12-18 18:40:15 +0000
committerYuchen Wu <yuchenericwu@hotmail.com>2013-12-18 18:40:15 +0000
commitf6358f3eefb380180502a0148941ddf2ae294119 (patch)
treeff3220d61ddad502ec8fd6195ecaa3edcdcbde6a /tools
parent25acded1b0e35c4996bc70c27ce75f1733da2d6a (diff)
downloadllvm-f6358f3eefb380180502a0148941ddf2ae294119.tar.gz
llvm-f6358f3eefb380180502a0148941ddf2ae294119.tar.bz2
llvm-f6358f3eefb380180502a0148941ddf2ae294119.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-cov/llvm-cov.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/llvm-cov/llvm-cov.cpp b/tools/llvm-cov/llvm-cov.cpp
index cd6ba18353..5372317005 100644
--- a/tools/llvm-cov/llvm-cov.cpp
+++ b/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);