diff options
author | Alex Lorenz <arphaman@gmail.com> | 2016-09-27 23:30:36 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2016-09-27 23:30:36 +0000 |
commit | 08780529b3d6deadbf1e1a1a19ea9689241eb4c1 (patch) | |
tree | 9e659b0aaf1c853e43c3e42cbf1f6669f78e4645 /clang/test/CoverageMapping/switchmacro.c | |
parent | 3e490ef94efbf87d52aea11eee8bc25739ca95d1 (diff) | |
download | bcm5719-llvm-08780529b3d6deadbf1e1a1a19ea9689241eb4c1.tar.gz bcm5719-llvm-08780529b3d6deadbf1e1a1a19ea9689241eb4c1.zip |
[Coverage] The coverage region for switch covers the code after the switch.
This patch fixes a regression introduced in r262697 that changed the way the
coverage regions for switches are constructed. The PGO instrumentation counter
for a switch statement refers to the counter at the exit of the switch.
Therefore, the coverage region for the switch statement should cover the code
that comes after the switch, and not the switch statement itself.
rdar://28480997
Differential Revision: https://reviews.llvm.org/D24981
llvm-svn: 282554
Diffstat (limited to 'clang/test/CoverageMapping/switchmacro.c')
-rw-r--r-- | clang/test/CoverageMapping/switchmacro.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CoverageMapping/switchmacro.c b/clang/test/CoverageMapping/switchmacro.c index f83d26fd168..55f93d8f60c 100644 --- a/clang/test/CoverageMapping/switchmacro.c +++ b/clang/test/CoverageMapping/switchmacro.c @@ -4,7 +4,7 @@ // CHECK: foo int foo(int i) { // CHECK-NEXT: File 0, [[@LINE]]:16 -> {{[0-9]+}}:2 = #0 - switch (i) { // CHECK-NEXT: File 0, [[@LINE]]:3 -> {{[0-9]+}}:4 = #1 + switch (i) { default: // CHECK-NEXT: File 0, [[@LINE]]:3 -> {{[0-9]+}}:11 = #2 if (i == 1) // CHECK-NEXT: File 0, [[@LINE]]:9 -> [[@LINE]]:15 = #2 return 0; // CHECK-NEXT: File 0, [[@LINE]]:7 -> [[@LINE]]:15 = #3 |