Reland "[Coverage] Fix branch coverage merging in FunctionCoverageSummary::get()...
authorAlan Phipps <a-phipps@ti.com>
Tue, 11 May 2021 16:40:11 +0000 (11:40 -0500)
committerAlan Phipps <a-phipps@ti.com>
Tue, 11 May 2021 16:48:23 +0000 (11:48 -0500)
commiteccb925147d5f262a3e74cc050d0665dd4e6d8db
tree268fc9225b5cdca14b8db116e4405acd7bf8ecf1
parent4f80340fb6712f5f1e97e7667bfd5cffa7d684b7
Reland "[Coverage] Fix branch coverage merging in FunctionCoverageSummary::get() for instantiation""

Originally landed in: 6400905a615282c83a2fc6e49e57ff716aa8b4de
Reverted in: 668dccc396da4f593ac87c92dc0eb7bc983b5762

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