[llvm-cov] Optionally fail on missing binary ID
authorDaniel Thornburgh <dthorn@google.com>
Fri, 17 Feb 2023 21:43:57 +0000 (13:43 -0800)
committerDaniel Thornburgh <dthorn@google.com>
Fri, 3 Mar 2023 18:24:21 +0000 (10:24 -0800)
commit072e07a9d5928fd3b1c1dabeac82890713ce172b
tree3940c80f7e2b9c98029d81a4a0a1a9b241644d45
parent3ac8d322100bc72aaacb67f13eb21d9b644f9930
[llvm-cov] Optionally fail on missing binary ID

This adds the --check-binary-id flag that makes sure that an object file
is available for every binary ID mentioned in the given profile. This
should help make the tool more robust in CI environments where it's
expected that coverage mappings should be available for every object
contributing to the profile.

Reviewed By: gulfem

Differential Revision: https://reviews.llvm.org/D144308
compiler-rt/test/profile/Linux/binary-id-lookup.c
llvm/docs/CommandGuide/llvm-cov.rst
llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
llvm/tools/llvm-cov/CodeCoverage.cpp