diff options
author | Tom Stellard <tstellar@redhat.com> | 2021-06-28 09:23:38 -0700 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2021-06-28 09:23:38 -0700 |
commit | fed41342a82f5a3a9201819a82bf7a48313e296b (patch) | |
tree | 95c3c1c553ca5e38d86e95201d2c109564c3447e /llvm/tools/llvm-cov/CoverageSummaryInfo.h | |
parent | b7c7b42db1d16c4cab595bf53c62a70a6a505e0e (diff) | |
download | llvm-release/12.x.tar.gz |
Revert "Revert "[Coverage] Fix branch coverage merging in FunctionCoverageSummary::get() for instantiation""llvmorg-12.0.1-rc4llvmorg-12.0.1release/12.x
This reverts commit 33d312b2d731507327252fd597bac1b738870330.
The original patch was correct, so we need to restore it in the
release branch.
Diffstat (limited to 'llvm/tools/llvm-cov/CoverageSummaryInfo.h')
-rw-r--r-- | llvm/tools/llvm-cov/CoverageSummaryInfo.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/llvm-cov/CoverageSummaryInfo.h b/llvm/tools/llvm-cov/CoverageSummaryInfo.h index 4bc1c24a079f..62e7cad1012b 100644 --- a/llvm/tools/llvm-cov/CoverageSummaryInfo.h +++ b/llvm/tools/llvm-cov/CoverageSummaryInfo.h @@ -123,6 +123,11 @@ public: return *this; } + void merge(const BranchCoverageInfo &RHS) { + Covered = std::max(Covered, RHS.Covered); + NumBranches = std::max(NumBranches, RHS.NumBranches); + } + size_t getCovered() const { return Covered; } size_t getNumBranches() const { return NumBranches; } |