[PATCH] llvm-cov: Print coverage summary to STDOUT.
Yuchen Wu
yuchenericwu at hotmail.com
Mon Dec 16 15:58:47 PST 2013
>> + // FIXME: There is no way to detect calls given current instrumentation.
>> + outs() << "File '" << Filename << "'\n";
>> + outs() << format("Lines executed:%.2lf%% of %u\n",
>> + double(Summary.LinesExec)*100/Summary.LogicalLines,
>> + Summary.LogicalLines);
>> + if (Options.BranchInfo) {
>> + if (Summary.Branches) {
>> + outs() << format("Branches executed:%.2lf%% of %u\n",
>> + double(Summary.BranchesExec)*100/Summary.Branches,
>> + Summary.Branches);
>> + outs() << format("Taken at least once:%.2lf%% of %u\n",
>> + double(Summary.BranchesTaken)*100/Summary.Branches,
>> + Summary.Branches);
>> + } else {
>> + outs() << "No branches\n";
>> + }
>> + outs() << "No calls\n"; // to be consistent with gcov
>> + }
>> + outs() << Filename << ":creating '" << CovFilename << "'\n";
>> + outs() << "\n";
>
> Might as well pull this out into a "printSummary" function.
Yep, makes sense.
>> }
>> }
>>
>> @@ -496,18 +522,18 @@ void FileInfo::printFunctionSummary(raw_fd_ostream &OS,
>> I != E; ++I) {
>> const GCOVFunction *Func = *I;
>> uint64_t EntryCount = Func->getEntryCount();
>> - uint32_t BlocksExecuted = 0;
>> + uint32_t BlocksExec = 0;
>
> Why rename this?
Because GCOVCoverage uses *Exec to shorten its members' names. This is to be consistent.
New patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-llvm-cov-Print-coverage-summary-to-STDOUT.patch
Type: application/octet-stream
Size: 8993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131216/93bc9243/attachment.obj>
More information about the llvm-commits
mailing list