1 // RUN: %clang_cc1 -fprofile-instr-generate -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name break.c %s | FileCheck %s
2 
3 int main() {         // CHECK: File 0, [[@LINE]]:12 -> [[@LINE+28]]:2 = #0 (HasCodeBefore = 0)
4   int cnt = 0;       // CHECK-NEXT: File 0, [[@LINE+1]]:9 -> [[@LINE+1]]:18 = #0 (HasCodeBefore = 0)
5   while(cnt < 100) { // CHECK-NEXT: File 0, [[@LINE]]:20 -> [[@LINE+3]]:4 = #1 (HasCodeBefore = 0)
6     break;
7     ++cnt;           // CHECK-NEXT: File 0, [[@LINE]]:5 -> [[@LINE]]:10 = 0 (HasCodeBefore = 0)
8   }                  // CHECK-NEXT: File 0, [[@LINE+1]]:9 -> [[@LINE+1]]:18 = #0 (HasCodeBefore = 0)
9   while(cnt < 100) { // CHECK-NEXT: File 0, [[@LINE]]:20 -> [[@LINE+6]]:4 = #2 (HasCodeBefore = 0)
10     {
11       break;
12       ++cnt;         // CHECK-NEXT: File 0, [[@LINE]]:7 -> [[@LINE+2]]:10 = 0 (HasCodeBefore = 0)
13     }
14     ++cnt;
15   }                  // CHECK-NEXT: File 0, [[@LINE+1]]:9 -> [[@LINE+1]]:18 = ((#0 + #3) - #4) (HasCodeBefore = 0)
16   while(cnt < 100) { // CHECK-NEXT: File 0, [[@LINE]]:20 -> [[@LINE+6]]:4 = #3 (HasCodeBefore = 0)
17     if(cnt == 0) {   // CHECK-NEXT: File 0, [[@LINE]]:18 -> [[@LINE+3]]:6 = #4 (HasCodeBefore = 0)
18       break;
19       ++cnt;         // CHECK-NEXT: File 0, [[@LINE]]:7 -> [[@LINE]]:12 = 0 (HasCodeBefore = 0)
20     }
21     ++cnt;           // CHECK-NEXT: File 0, [[@LINE]]:5 -> [[@LINE]]:10 = (#3 - #4) (HasCodeBefore = 0)
22   }                  // CHECK-NEXT: File 0, [[@LINE+1]]:9 -> [[@LINE+1]]:18 = (#0 + #6) (HasCodeBefore = 0)
23   while(cnt < 100) { // CHECK-NEXT: File 0, [[@LINE]]:20 -> [[@LINE+7]]:4 = #5 (HasCodeBefore = 0)
24     if(cnt == 0) {   // CHECK-NEXT: File 0, [[@LINE]]:18 -> [[@LINE+5]]:10 = #6 (HasCodeBefore = 0)
25       ++cnt;
26     } else {         // CHECK-NEXT: File 0, [[@LINE]]:12 -> [[@LINE+2]]:6 = (#5 - #6) (HasCodeBefore = 0)
27       break;
28     }
29     ++cnt;
30   }
31 }
32