summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/llvm-cov.cpp
diff options
context:
space:
mode:
authorYuchen Wu <yuchenericwu@hotmail.com>2013-12-19 00:29:25 +0000
committerYuchen Wu <yuchenericwu@hotmail.com>2013-12-19 00:29:25 +0000
commitbb6a477131a7f23a6df66f4005b932e6fd34a718 (patch)
treee2a1698dc98fc9b6c9bf47e87d107c19f7f8f8e7 /llvm/tools/llvm-cov/llvm-cov.cpp
parent23f2fcaed88664166184ab2a8b13f4abe79858c1 (diff)
downloadbcm5719-llvm-bb6a477131a7f23a6df66f4005b932e6fd34a718.tar.gz
bcm5719-llvm-bb6a477131a7f23a6df66f4005b932e6fd34a718.zip
llvm-cov: Added -f option for function summaries.
Similar to the file summaries, the function summaries output line, branching and call statistics. The file summaries have been moved outside the initial loop so that all of the function summaries can be outputted before file summaries. Also updated test cases. llvm-svn: 197633
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 5372317005b..31f6ad0058e 100644
--- a/llvm/tools/llvm-cov/llvm-cov.cpp
+++ b/llvm/tools/llvm-cov/llvm-cov.cpp
@@ -41,6 +41,9 @@ BranchCount("c", cl::init(false), cl::desc("display branch counts instead of \
probabilities (requires -b)"));
static cl::opt<bool>
+FuncCoverage("f", cl::init(false), cl::desc("output function coverage"));
+
+static cl::opt<bool>
UncondBranch("u", cl::init(false), cl::desc("display unconditional branch info \
(requires -b)"));
@@ -84,7 +87,8 @@ int main(int argc, char **argv) {
if (DumpGCOV)
GF.dump();
- GCOVOptions Options(AllBlocks, BranchInfo, BranchCount, UncondBranch);
+ GCOVOptions Options(AllBlocks, BranchInfo, BranchCount, FuncCoverage,
+ UncondBranch);
FileInfo FI(Options);
GF.collectLineCounts(FI);
FI.print(InputGCNO, InputGCDA);
OpenPOWER on IntegriCloud