1 // FULL: SF:{{.*}}showLineExecutionCounts.cpp
6 int main() { // FULL: DA:[[@LINE]],161
7 int x = 0; // FULL: DA:[[@LINE]],161
8 // FULL: DA:[[@LINE]],161
9 if (x) { // FULL: DA:[[@LINE]],161
10 x = 0; // FULL: DA:[[@LINE]],0
11 } else { // FULL: DA:[[@LINE]],161
12 x = 1; // FULL: DA:[[@LINE]],161
13 } // FULL: DA:[[@LINE]],161
14 // FULL: DA:[[@LINE]],161
15 for (int i = 0; i < 100; ++i) { // FULL: DA:[[@LINE]],16261
16 x = 1; // FULL: DA:[[@LINE]],16100
17 } // FULL: DA:[[@LINE]],16100
18 // FULL: DA:[[@LINE]],161
19 x = x < 10 ? x + 1 : x - 1; // FULL: DA:[[@LINE]],161
20 x = x > 10 ? // FULL: DA:[[@LINE]],161
21 x - 1: // FULL: DA:[[@LINE]],0
22 x + 1; // FULL: DA:[[@LINE]],161
23 // FULL: DA:[[@LINE]],161
24 return 0; // FULL: DA:[[@LINE]],161
25 } // FULL: DA:[[@LINE]],161
28 // FULL: end_of_record
29 // RUN: llvm-profdata merge %S/Inputs/lineExecutionCounts.proftext -o %t.profdata
30 // RUN: llvm-cov export -format=lcov %S/Inputs/lineExecutionCounts.covmapping -instr-profile %t.profdata %s | FileCheck -check-prefixes=FULL %s
32 // RUN: llvm-cov export -format=lcov -summary-only %S/Inputs/lineExecutionCounts.covmapping -instr-profile %t.profdata %s | FileCheck -check-prefixes=SUMMARYONLY %s
33 // SUMMARYONLY: SF:{{.*}}showLineExecutionCounts.cpp
38 // SUMMARYONLY: end_of_record