[llvm-branch-commits] [clang] [llvm] Coverage] Make additional counters available for BranchRegion. NFC. (PR #120930)

Jessica Paquette via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Dec 22 20:36:57 PST 2024


================
@@ -940,15 +939,35 @@ struct CounterCoverageMappingBuilder
 
   std::pair<Counter, Counter> getBranchCounterPair(const Stmt *S,
                                                    Counter ParentCnt) {
-    Counter ExecCnt = getRegionCounter(S);
-    return {ExecCnt, Builder.subtract(ParentCnt, ExecCnt)};
+    auto &TheMap = CounterMap[S];
+    auto ExecCnt = Counter::getCounter(TheMap.first);
----------------
ornata wrote:

can the map be empty?

https://github.com/llvm/llvm-project/pull/120930


More information about the llvm-branch-commits mailing list