summaryrefslogtreecommitdiff
path: root/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
commitd218959ec5e6c7d3b129f9437bc243b9bdab9e27 (patch)
tree9dfff3655df3098b0e2fd4e55df831a7b2527c06 /tools/llvm-cov/llvm-cov.cpp
parentdeb8e33163b237cecb58eacb90168155eee0573f (diff)
downloadllvm-d218959ec5e6c7d3b129f9437bc243b9bdab9e27.tar.gz
llvm-d218959ec5e6c7d3b129f9437bc243b9bdab9e27.tar.bz2
llvm-d218959ec5e6c7d3b129f9437bc243b9bdab9e27.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197633 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-cov/llvm-cov.cpp')
-rw-r--r--tools/llvm-cov/llvm-cov.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/llvm-cov/llvm-cov.cpp b/tools/llvm-cov/llvm-cov.cpp
index 5372317005..31f6ad0058 100644
--- a/tools/llvm-cov/llvm-cov.cpp
+++ b/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);