[PATCH] D23987: [Coverage] Suppress creating a code region if the same area is covered by an expansion region.
Igor Kudrin via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 30 09:19:53 PDT 2016
ikudrin added inline comments.
================
Comment at: lib/CodeGen/CoverageMappingGen.cpp:261
@@ -253,2 +260,3 @@
+ void emitSourceRegions(const SourceRegionFilter &Filter) {
for (const auto &Region : SourceRegions) {
assert(Region.hasEndLoc() && "incomplete region");
----------------
Well, passing a distinct empty value from `EmptyCoverageMappingBuilder::write()` is a bit clearer.
================
Comment at: lib/CodeGen/CoverageMappingGen.cpp:633
@@ -614,3 +632,3 @@
CoverageMappingWriter Writer(VirtualFileMapping, Builder.getExpressions(),
MappingRegions);
----------------
I believe, it's mostly to make our tests happy, but I don't want to make more changes in the program's behaviour than needed.
https://reviews.llvm.org/D23987
More information about the cfe-commits
mailing list