diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
commit | 5a5ac124e1efaf208671f01c46edb15f29ed2a0b (patch) | |
tree | a6140557876943cdd800ee997c9317283394b22c /tools/llvm-cov/SourceCoverageView.h | |
parent | f03b5bed27d0d2eafd68562ce14f8b5e3f1f0801 (diff) |
Diffstat (limited to 'tools/llvm-cov/SourceCoverageView.h')
-rw-r--r-- | tools/llvm-cov/SourceCoverageView.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/llvm-cov/SourceCoverageView.h b/tools/llvm-cov/SourceCoverageView.h index d92a7486d9d34..9e6fe5f350012 100644 --- a/tools/llvm-cov/SourceCoverageView.h +++ b/tools/llvm-cov/SourceCoverageView.h @@ -90,15 +90,14 @@ private: bool hasMultipleRegions() const { return RegionCount > 1; } void addRegionStartCount(uint64_t Count) { - Mapped = true; - ExecutionCount = Count; + // The max of all region starts is the most interesting value. + addRegionCount(RegionCount ? std::max(ExecutionCount, Count) : Count); ++RegionCount; } void addRegionCount(uint64_t Count) { Mapped = true; - if (!RegionCount) - ExecutionCount = Count; + ExecutionCount = Count; } }; |