]> granicus.if.org Git - clang/commit
[coverage] Make smaller regions for the first case of a switch.
authorEli Friedman <efriedma@codeaurora.org>
Wed, 2 Aug 2017 23:22:50 +0000 (23:22 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Wed, 2 Aug 2017 23:22:50 +0000 (23:22 +0000)
commit2f1c6854c2baf6ff0a1e0741c13fde0cef479afd
treeb3e37861935c3b434be39019fcfee316a553d840
parent9e9e15f1810ac4777ffdb5a2f5b73eaadee8041e
[coverage] Make smaller regions for the first case of a switch.

We never overwrite the end location of a region, so we would end up with
an overly large region when we reused the switch's region.

It's possible this code will be substantially rewritten in the near
future to deal with fallthrough more accurately, but this seems like
an improvement on its own for now.

Differential Revision: https://reviews.llvm.org/D34801

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309901 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CoverageMappingGen.cpp
test/CoverageMapping/switch.cpp