[PATCH] D36813: [Coverage] Build sorted and unique segments

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 00:25:57 PDT 2017


ikudrin added inline comments.


================
Comment at: include/llvm/ProfileData/Coverage/CoverageMapping.h:201
 
+using LineColPair = std::pair<unsigned, unsigned>;
+
----------------
I love this change! But maybe it deserves a separate patch?


================
Comment at: unittests/ProfileData/CoverageMappingTest.cpp:566
+  EXPECT_EQ(CoverageSegment(3, 21, true), Segments[6]);
+  // Make sure to emit a skipped segment for the zero-length region at 3:21.
+  EXPECT_EQ(CoverageSegment(4, 4, false), Segments[7]);
----------------
Could you remind me where zero-length regions like (3:21) might come from?
Right now, it looks like the area from 3:21 to 4:4 has no counter associated with it, but I'd expect that a counter from the top-level region (1:5 - 4:4) was used here.


https://reviews.llvm.org/D36813





More information about the llvm-commits mailing list