[all-commits] [llvm/llvm-project] dc9e30: [llvm-cov] Add support for baseline coverage (#117...

Fabian Meumertzheim via All-commits all-commits at lists.llvm.org
Fri Jun 13 08:49:52 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dc9e300f12f3b9c8160dbfb0bc32252ad99c3ba7
      https://github.com/llvm/llvm-project/commit/dc9e300f12f3b9c8160dbfb0bc32252ad99c3ba7
  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:
  -----------
  [llvm-cov] Add support for baseline coverage (#117910)

When no profile is provided, but the new --empty-profile option is
specifed, 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.



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