[ARM] Cortex-M4 schedule additions
[llvm-complete.git] / test / tools / llvm-cov / showHighlightedRanges.cpp
bloba412c5375cb9b8d018b0703e94c1a2e501fd8421
1 // RUN: llvm-cov show %S/Inputs/highlightedRanges.covmapping -instr-profile %S/Inputs/highlightedRanges.profdata -dump -path-equivalence=/tmp,%S %s 2>&1 | FileCheck %s -check-prefixes=TEXT,SHARED
3 void func() {
4 return;
5 int i = 0; // SHARED: Highlighted line [[@LINE]], 3 ->
6 } // SHARED: Highlighted line [[@LINE]], 1 -> 2
8 void func2(int x) {
9 if(x > 5) {
10 while(x >= 9) {
11 return;
12 --x; // SHARED: Highlighted line [[@LINE]], 7 ->
14 int i = 0; // SHARED: Highlighted line [[@LINE]], 5 ->
15 } // SHARED: Highlighted line [[@LINE]], 1 -> 4
18 void test() {
19 int x = 0;
21 if (x) { // SHARED: Highlighted line [[@LINE]], 10 ->
22 x = 0; // SHARED: Highlighted line [[@LINE]], 1 ->
23 } else { // SHARED: Highlighted line [[@LINE]], 1 -> 4
24 x = 1;
27 // SHARED: Highlighted line [[@LINE+1]], 26 ->
28 for (int i = 0; i < 0; ++i) { // SHARED: Highlighted line [[@LINE]], 31 ->
29 x = 1; // SHARED: Highlighted line [[@LINE]], 1 ->
30 } // SHARED: Highlighted line [[@LINE]], 1 -> 4
32 x = x < 10 ? x +
34 : x - 1; // SHARED: Highlighted line [[@LINE]], 16 -> 21
35 x = x > 10 ? x + // SHARED: Highlighted line [[@LINE]], 16 ->
36 1 // SHARED: Highlighted line [[@LINE]], 1 -> 17
37 : x - 1;
40 int main() {
41 test();
42 func();
43 func2(9);
44 return 0;
47 // RUN: llvm-cov show %S/Inputs/highlightedRanges.covmapping -instr-profile %S/Inputs/highlightedRanges.profdata -format html -dump -path-equivalence=/tmp,%S %s 2>&1 | FileCheck %s -check-prefixes=HTML,SHARED