From bb6a477131a7f23a6df66f4005b932e6fd34a718 Mon Sep 17 00:00:00 2001 From: Yuchen Wu Date: Thu, 19 Dec 2013 00:29:25 +0000 Subject: 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 --- llvm/tools/llvm-cov/llvm-cov.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'llvm/tools/llvm-cov/llvm-cov.cpp') diff --git a/llvm/tools/llvm-cov/llvm-cov.cpp b/llvm/tools/llvm-cov/llvm-cov.cpp index 5372317..31f6ad0 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 +FuncCoverage("f", cl::init(false), cl::desc("output function coverage")); + +static cl::opt 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); -- cgit v1.1