[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)
Jessica Paquette via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 18 00:57:01 PDT 2024
================
@@ -941,6 +941,19 @@ struct CounterCoverageMappingBuilder
return Counter::getCounter(CounterMap[S]);
}
+ std::pair<Counter, Counter> getBranchCounterPair(const Stmt *S,
+ Counter ParentCnt) {
+ Counter ExecCnt = getRegionCounter(S);
+ return {ExecCnt, Builder.subtract(ParentCnt, ExecCnt)};
+ }
+
+ bool IsCounterEqual(Counter OutCount, Counter ParentCount) {
----------------
ornata wrote:
Should OutCount and ParentCount be const?
https://github.com/llvm/llvm-project/pull/112702
More information about the cfe-commits
mailing list