[Coverage] Map regions from system headers
authorGulfem Savrun Yeniceri <gulfem@google.com>
Fri, 27 Jan 2023 18:02:26 +0000 (18:02 +0000)
committerGulfem Savrun Yeniceri <gulfem@google.com>
Mon, 6 Feb 2023 18:12:01 +0000 (18:12 +0000)
commit2155195131a57f2f01e7cfabb85bb027518c2dc6
tree41b4a838d1d1206b486692735da853d9ae0313be
parent8028263c41e335bc96c40402f8ab44ad405023de
[Coverage] Map regions from system headers

Originally, the following commit removed mapping coverage regions for system headers:
https://github.com/llvm/llvm-project/commit/93205af066341a53733046894bd75c72c99566db

It might be viable and useful to collect coverage from system headers in some systems.
This patch adds --system-headers-coverage option (disabled by default) to enable
collecting coverage from system headers.

Differential Revision: https://reviews.llvm.org/D143304
clang/lib/CodeGen/CoverageMappingGen.cpp
clang/test/CoverageMapping/system_macro.cpp