[llvm] Refactor processing of BranchRegions associated with an MCDCDecisionRegion (PR #78819)
Alan Phipps via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 16:25:37 PST 2024
================
@@ -636,20 +657,56 @@ Error CoverageMapping::loadFunctionRecord(
Record.MappingRegions[0].Count.isZero() && Counts[0] > 0)
return Error::success();
- unsigned NumConds = 0;
- const CounterMappingRegion *MCDCDecision;
- std::vector<CounterMappingRegion> MCDCBranches;
-
FunctionRecord Function(OrigFuncName, Record.Filenames);
- for (const auto &Region : Record.MappingRegions) {
+
+ const auto &RegionsBegin = Record.MappingRegions.begin();
+ const auto &RegionsEnd = Record.MappingRegions.end();
+ for (auto It = RegionsBegin; It != RegionsEnd; ++It) {
----------------
evodius96 wrote:
I would've preferred to keep the range-based loop as preferred by the LLVM coding standards, but the iterator is useful in being able to scan ahead in the list.
https://github.com/llvm/llvm-project/pull/78819
More information about the llvm-commits
mailing list