aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CoverageMapping/preprocessor.c
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-02-19 03:10:30 +0000
committerJustin Bogner <mail@justinbogner.com>2015-02-19 03:10:30 +0000
commit91f2e3c9c2650795d95c80a7f922054ca74c1ac5 (patch)
tree4b102469f03aa1e8ac71b35eb4f813b61cd152c9 /clang/test/CoverageMapping/preprocessor.c
parent62d8aa5caf0a2a7b699b2dc5d98b1fdcd8b6053d (diff)
downloadllvm-91f2e3c9c2650795d95c80a7f922054ca74c1ac5.zip
llvm-91f2e3c9c2650795d95c80a7f922054ca74c1ac5.tar.gz
llvm-91f2e3c9c2650795d95c80a7f922054ca74c1ac5.tar.bz2
InstrProf: Always emit a coverage region for the condition of an if
When tools like llvm-cov show regions, it's much easier to understand what's happening if the condition of an if shows a counter as well as the body. llvm-svn: 229813
Diffstat (limited to 'clang/test/CoverageMapping/preprocessor.c')
-rw-r--r--clang/test/CoverageMapping/preprocessor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/CoverageMapping/preprocessor.c b/clang/test/CoverageMapping/preprocessor.c
index d9ff5b1..cdd448c 100644
--- a/clang/test/CoverageMapping/preprocessor.c
+++ b/clang/test/CoverageMapping/preprocessor.c
@@ -15,7 +15,7 @@ void func() { // CHECK: File 0, [[@LINE]]:13 -> [[@LINE+5]]:2 = #0
#endif
// CHECK: main
-int main() { // CHECK-NEXT: File 0, [[@LINE]]:12 -> [[@LINE+19]]:2 = #0
+int main() { // CHECK-NEXT: File 0, [[@LINE]]:12 -> {{[0-9]+}}:2 = #0
int i = 0;
#if 0 // CHECK-NEXT: Skipped,File 0, [[@LINE]]:2 -> [[@LINE+4]]:2 = 0
if(i == 0) {
@@ -24,6 +24,7 @@ int main() { // CHECK-NEXT: File 0, [[@LINE]]:12 -> [[@LINE+19]]:2 = #0
#endif
#if 1
+ // CHECK-NEXT: File 0, [[@LINE+1]]:6 -> [[@LINE+1]]:12 = #0
if(i == 0) { // CHECK-NEXT: File 0, [[@LINE]]:14 -> [[@LINE+2]]:4 = #1
i = 1;
}