[clang] [compiler-rt] [llvm] Add a field in Coverage Mapping header for tracking coverage capabilities (PR #158059)
Alan Phipps via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 12 13:16:34 PDT 2025
Dorian =?utf-8?q?Péron?= <peron at adacore.com>,
Dorian =?utf-8?q?Péron?= <peron at adacore.com>,
Dorian =?utf-8?q?Péron?= <peron at adacore.com>,
Dorian =?utf-8?q?Péron?= <peron at adacore.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/158059 at github.com>
================
@@ -2604,6 +2604,15 @@ void CoverageMappingModuleGen::emit() {
};
auto CovDataHeaderTy =
llvm::StructType::get(Ctx, ArrayRef(CovDataHeaderTypes));
+
+ // By default, clang instruments the code for "statement" and "branch"
----------------
evodius96 wrote:
I know what you're getting at with "Statement", but LLVM uses "Region Coverage", which is more-or-less the same thing (as regions are created according to statement scopes, etc). I think this extension ought to follow that convention by also referring to "Region Coverage".
Of course, "regions" also facilitates other metrics: line coverage, function coverage, and branch coverage, all together (with MC/DC with another option). I'm OK with limiting your extension to "Region", "Branch", and "MCDC".
https://github.com/llvm/llvm-project/pull/158059
More information about the cfe-commits
mailing list