summaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov/CoverageSummaryInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-cov/CoverageSummaryInfo.h')
-rw-r--r--llvm/tools/llvm-cov/CoverageSummaryInfo.h5
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; }