Fix branch coverage merging in FunctionCoverageSummary::get() for instantiation
authorAlan Phipps <a-phipps@ti.com>
Mon, 10 May 2021 20:15:26 +0000 (15:15 -0500)
committerAlan Phipps <a-phipps@ti.com>
Tue, 11 May 2021 15:42:40 +0000 (10:42 -0500)
commit6400905a615282c83a2fc6e49e57ff716aa8b4de
tree3ecc65b326abb725b80b2b1409d3153c3148be25
parent2c1f9f390b0a5dd308e2e925fe250d19a29c103f
Fix branch coverage merging in FunctionCoverageSummary::get() for instantiation
groups.

This change corrects the implementation for the branch coverage
summary to do the same thing for branches that is done for lines and regions.
That is, across function instantiations in an instantiation group, the maximum
branch coverage found in any of those instantiations is returned, with the
total number of branches being the same across instantiations.

Differential Revision: https://reviews.llvm.org/D102193
llvm/test/tools/llvm-cov/branch-templates.cpp
llvm/tools/llvm-cov/CoverageSummaryInfo.cpp
llvm/tools/llvm-cov/CoverageSummaryInfo.h