[llvm] [Coverage] Move SingleByteCoverage out of CountedRegion (PR #110966)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 17:12:21 PDT 2024


================
@@ -1424,7 +1429,8 @@ CoverageData CoverageMapping::getCoverageForFile(StringRef Filename) const {
   }
 
   LLVM_DEBUG(dbgs() << "Emitting segments for file: " << Filename << "\n");
-  FileCoverage.Segments = SegmentBuilder::buildSegments(Regions);
+  FileCoverage.Segments =
+      SegmentBuilder::buildSegments(Regions, *SingleByteCoverage);
----------------
ellishg wrote:

This will crash if `RecordIndices` is empty. Is that possible? If not, can we add an assert?

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


More information about the llvm-commits mailing list