mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
llvm-cov: Use the number of executed functions for the function coverage metric.
This commit fixes llvm-cov's function coverage metric by using the number of executed functions instead of the number of fully covered functions. Differential Revision: http://reviews.llvm.org/D5196 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218672 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -167,7 +167,9 @@ CoverageMapping::load(ObjectFileCoverageMappingReader &CoverageReader,
|
||||
continue;
|
||||
}
|
||||
|
||||
FunctionRecord Function(Record.FunctionName, Record.Filenames);
|
||||
assert(Counts.size() != 0 && "Function's counts are empty");
|
||||
FunctionRecord Function(Record.FunctionName, Record.Filenames,
|
||||
Counts.front());
|
||||
CounterMappingContext Ctx(Record.Expressions, Counts);
|
||||
for (const auto &Region : Record.MappingRegions) {
|
||||
ErrorOr<int64_t> ExecutionCount = Ctx.evaluate(Region.Count);
|
||||
|
Reference in New Issue
Block a user