================
@@ -719,10 +720,10 @@ struct FunctionRecord {
         Region.Kind == CounterMappingRegion::MCDCBranchRegion) {
       CountedBranchRegions.emplace_back(Region, Count, FalseCount,
                                         HasSingleByteCoverage);
-      // If both counters are hard-coded to zero, then this region represents a
+      // If either counters is hard-coded to zero, then this region represents 
a
       // constant-folded branch.
-      if (Region.Count.isZero() && Region.FalseCount.isZero())
-        CountedBranchRegions.back().Folded = true;
+      CountedBranchRegions.back().TrueFolded = Region.Count.isZero();
----------------
chapuni wrote:

`CounterMappingRegion::Count` is used in non-Branch regions. (then, 
`FalseCount` may be N/A)

Similar cases can be seen in `llvm::CountedRegion` and Clang's 
`SourceMappingRegion`. So, I think it'd be our common sense for the region to 
have `FalseCount` optionally.

In contrast, `Folded` is specific to Branch region. So, I think `TrueFolded` 
would be less intrusive.

https://github.com/llvm/llvm-project/pull/112694
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to