aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov/llvm-cov.cpp
diff options
context:
space:
mode:
authorYuchen Wu <yuchenericwu@hotmail.com>2013-12-16 22:14:02 +0000
committerYuchen Wu <yuchenericwu@hotmail.com>2013-12-16 22:14:02 +0000
commit66d93b82ac7fe2c7cc82ffb61a1ad07a7838397f (patch)
treeb2a71c66287c3f805b80ecb3f890c627911c1331 /llvm/tools/llvm-cov/llvm-cov.cpp
parent9ed985baadc3b1df704892d1c85a97c38a19e46a (diff)
downloadllvm-66d93b82ac7fe2c7cc82ffb61a1ad07a7838397f.zip
llvm-66d93b82ac7fe2c7cc82ffb61a1ad07a7838397f.tar.gz
llvm-66d93b82ac7fe2c7cc82ffb61a1ad07a7838397f.tar.bz2
llvm-cov: Added -u option for unconditional branch info.
Outputs branch information for unconditional branches in addition to conditional branches. -b option must be enabled. Also updated tests. llvm-svn: 197432
Diffstat (limited to 'llvm/tools/llvm-cov/llvm-cov.cpp')
-rw-r--r--llvm/tools/llvm-cov/llvm-cov.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/llvm-cov.cpp b/llvm/tools/llvm-cov/llvm-cov.cpp
index fd4fa24..cd6ba18 100644
--- a/llvm/tools/llvm-cov/llvm-cov.cpp
+++ b/llvm/tools/llvm-cov/llvm-cov.cpp
@@ -36,6 +36,10 @@ 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"));
+static cl::opt<bool>
+UncondBranch("u", cl::init(false), cl::desc("display unconditional branch info \
+ (only works with -b)"));
+
//===----------------------------------------------------------------------===//
int main(int argc, char **argv) {
// Print a stack trace if we signal out.
@@ -76,7 +80,7 @@ int main(int argc, char **argv) {
if (DumpGCOV)
GF.dump();
- GCOVOptions Options(AllBlocks, BranchProb);
+ GCOVOptions Options(AllBlocks, BranchProb, UncondBranch);
FileInfo FI(Options);
GF.collectLineCounts(FI);
FI.print(InputGCNO, InputGCDA);