Home | History | Annotate | Download | only in Coverage

Lines Matching defs:Regions

208     assert(!Record.MappingRegions.empty() && "Function has no regions");
294 // Avoid creating empty regions.
325 void buildSegmentsImpl(ArrayRef<CountedRegion> Regions) {
326 for (const auto &Region : Regions) {
327 // Pop any regions that end before this one starts.
335 // Pop any regions that are left in the stack.
340 /// Sort a nested sequence of regions from a single file.
341 static void sortNestedRegions(MutableArrayRef<CountedRegion> Regions) {
342 std::sort(Regions.begin(), Regions.end(), [](const CountedRegion &LHS,
352 // regions of the same kind as the first region of the area, prefer
363 /// Combine counts of regions which cover the same area.
365 combineRegions(MutableArrayRef<CountedRegion> Regions) {
366 if (Regions.empty())
367 return Regions;
368 auto Active = Regions.begin();
369 auto End = Regions.end();
370 for (auto I = Regions.begin() + 1; I != End; ++I) {
389 // We add counts of the regions of the same kind as the active region
394 return Regions.drop_back(std::distance(++Active, End));
398 /// Build a list of CoverageSegments from a list of Regions.
400 buildSegments(MutableArrayRef<CountedRegion> Regions) {
404 sortNestedRegions(Regions);
405 ArrayRef<CountedRegion> CombinedRegions = combineRegions(Regions);
461 std::vector<coverage::CountedRegion> Regions;
468 Regions.push_back(CR);
475 FileCoverage.Segments = SegmentBuilder::buildSegments(Regions);
507 std::vector<coverage::CountedRegion> Regions;
510 Regions.push_back(CR);
516 FunctionCoverage.Segments = SegmentBuilder::buildSegments(Regions);
525 std::vector<coverage::CountedRegion> Regions;
528 Regions.push_back(CR);
535 ExpansionCoverage.Segments = SegmentBuilder::buildSegments(Regions);