[all-commits] [llvm/llvm-project] 83f215: Reland "[llvm-cov] Add support for baseline covera...

Fabian Meumertzheim via All-commits all-commits at lists.llvm.org
Fri Jun 13 12:10:20 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 83f215b0350289f3bd349c1f85826a58d8d80f03
      https://github.com/llvm/llvm-project/commit/83f215b0350289f3bd349c1f85826a58d8d80f03
  Author: Fabian Meumertzheim <fabian at meumertzhe.im>
  Date:   2025-06-13 (Fri, 13 Jun 2025)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-cov.rst
    M llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
    M llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
    A llvm/test/tools/llvm-cov/showLineExecutionCounts-lcov-baseline.test
    M llvm/tools/llvm-cov/CodeCoverage.cpp
    M llvm/unittests/ProfileData/CoverageMappingTest.cpp

  Log Message:
  -----------
  Reland "[llvm-cov] Add support for baseline coverage" (#144130)

When no profile is provided, but the new --empty-profile option is
specified, the export/report/show commands now emit coverage data
equivalent to that obtained from a profile with all zero counters
("baseline coverage").

This is useful for build systems (e.g. Bazel) that can track coverage
information for each build target, even those that are never linked into
tests and thus don't have runtime coverage data recorded. By merging in
baseline coverage, lines in files that aren't linked into tests are
correctly reported as uncovered.

Reland with fixes to `CoverageMappingTest.cpp`.

Reverts llvm/llvm-project#144121



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list