llvm-cov: Disentangle the coverage data logic from the display (NFC)

This splits the logic for actually looking up coverage information
from the logic that displays it. These were tangled rather thoroughly
so this change is a bit large, but it mostly consists of moving things
around. The coverage lookup logic itself now lives in the library,
rather than being spread between the library and the tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218184 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Justin Bogner
2014-09-20 15:31:56 +00:00
parent 73edcffc8f
commit 9eb38163a5
14 changed files with 542 additions and 479 deletions

View File

@ -18,7 +18,7 @@ using namespace llvm;
using namespace coverage;
FunctionCoverageSummary
FunctionCoverageSummary::get(const FunctionCoverageMapping &Function) {
FunctionCoverageSummary::get(const coverage::FunctionRecord &Function) {
// Compute the region coverage
size_t NumCodeRegions = 0, CoveredRegions = 0;
for (auto &CR : Function.CountedRegions) {