[PATCH] D70571: [Coverage] Emit a gap region to cover switch bodies

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 21 14:48:08 PST 2019


vsk created this revision.
vsk added reviewers: hans, rnk, efriedma.
vsk edited the summary of this revision.

Emit a gap region beginning where the switch body begins. This sets line
execution counts in the areas between non-overlapping cases to 0.

This does not resolve an outstanding issue with case statement regions
that do not end when a region is terminated. But it should address
llvm.org/PR44011.


https://reviews.llvm.org/D70571

Files:
  clang/lib/CodeGen/CoverageMappingGen.cpp
  clang/test/CoverageMapping/switch.cpp
  clang/test/CoverageMapping/switchmacro.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70571.230541.patch
Type: text/x-patch
Size: 5005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191121/97c3bf5a/attachment.bin>


More information about the cfe-commits mailing list