[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)
Jessica Paquette via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 18 00:57:39 PDT 2024
================
@@ -1592,6 +1605,13 @@ struct CounterCoverageMappingBuilder
llvm::EnableSingleByteCoverage
? getRegionCounter(S->getCond())
: addCounters(ParentCount, BackedgeCount, BC.ContinueCount);
+ auto [ExecCount, ExitCount] =
+ (llvm::EnableSingleByteCoverage
+ ? std::make_pair(getRegionCounter(S), Counter::getZero())
+ : getBranchCounterPair(S, CondCount));
+ if (!llvm::EnableSingleByteCoverage) {
----------------
ornata wrote:
probably needs to be wrapped in NDEBUG or whatever?
https://github.com/llvm/llvm-project/pull/112702
More information about the cfe-commits
mailing list