[Coverage][llvm-cov] Correctly export branch coverage in LCOV format

Commit 9f2967bcfe introduced support for
branch coverage including export to the LCOV format.

This commit corrects the LCOV field name for branches from BFH to BRH.
The mistake seems to have slipped in as typo because the correct field
name BRH is used in the comment section at the beginning of the file.

Differential Revision: https://reviews.llvm.org/D108358
This commit is contained in:
Christian Fetzer 2021-08-20 13:24:44 -05:00 committed by Alan Phipps
parent b8e345b266
commit 9116211d18
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@
// CHECK-DAG: BRDA:53,0,1,5
// CHECK-NOT: BRDA
// CHECK: BRF:30
// CHECK: BFH:26
// CHECK: BRH:26
// Check recursive macro-expansions.
// RUN: llvm-profdata merge %S/Inputs/branch-macros.proftext -o %t.profdata
@ -70,4 +70,4 @@
// MACROS-NOT: BRDA:37
// MACROS-NOT: BRDA
// MACROS: BRF:40
// MACROS: BFH:24
// MACROS: BRH:24

View File

@ -167,7 +167,7 @@ void renderLineSummary(raw_ostream &OS, const FileCoverageSummary &Summary) {
void renderBranchSummary(raw_ostream &OS, const FileCoverageSummary &Summary) {
OS << "BRF:" << Summary.BranchCoverage.getNumBranches() << '\n'
<< "BFH:" << Summary.BranchCoverage.getCovered() << '\n';
<< "BRH:" << Summary.BranchCoverage.getCovered() << '\n';
}
void renderFile(raw_ostream &OS, const coverage::CoverageMapping &Coverage,