[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)
Jessica Paquette via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 18 20:20:12 PST 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:
Do you mean that more stuff will be under this `if`?
https://github.com/llvm/llvm-project/pull/112702
More information about the cfe-commits
mailing list