[PATCH] D23987: [Coverage] Suppress creating a code region if the same area is covered by an expansion region.
Vedant Kumar via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 29 11:13:28 PDT 2016
vsk added a comment.
Thanks for looking into this! I like the SourceRegionFilter setup.
================
Comment at: lib/CodeGen/CoverageMappingGen.cpp:261
@@ -253,1 +260,3 @@
+ void
+ emitSourceRegions(const SourceRegionFilter &Filter = SourceRegionFilter()) {
for (const auto &Region : SourceRegions) {
----------------
Nit, is the default value needed?
================
Comment at: lib/CodeGen/CoverageMappingGen.cpp:634
@@ -610,1 +633,3 @@
+ return LHS.Kind < RHS.Kind;
+ });
gatherSkippedRegions();
----------------
Out of curiosity, is this stable_sort step required for correctness? Or would our CHECK lines break without this?
In either case, would it be feasible to merge this step with the stable_sort in CoverageMappingWriter::write()?
https://reviews.llvm.org/D23987
More information about the cfe-commits
mailing list