1 | int main(int argc, char** argv) { |
2 | #pragma omp TGT1_DIRECTIVE |
3 | { |
4 | #ifdef LOOP_DIRECTIVE |
5 | #pragma omp LOOP_DIRECTIVE |
6 | for (int i = 0; i < argc; ++i) |
7 | #endif |
8 | { |
9 | #ifdef BODY_DIRECTIVE |
10 | #pragma omp BODY_DIRECTIVE |
11 | { |
12 | } |
13 | #endif |
14 | } |
15 | } |
16 | |
17 | #ifdef TGT2_DIRECTIVE |
18 | #pragma omp TGT2_DIRECTIVE |
19 | { |
20 | #ifdef LOOP_DIRECTIVE |
21 | #pragma omp LOOP_DIRECTIVE |
22 | for (int i = 0; i < argc; ++i) |
23 | #endif |
24 | { |
25 | #ifdef BODY_DIRECTIVE |
26 | #pragma omp BODY_DIRECTIVE |
27 | { |
28 | } |
29 | #endif |
30 | } |
31 | } |
32 | #endif |
33 | } |
34 | |
35 | // Check for an empty kernel (IR level) |
36 | // FIRST: define weak_odr {{.*}} void @__omp_offloading_{{.*}}_main |
37 | // FIRST-NEXT: ret void |
38 | |
39 | // Check for two empty kernels (IR level) |
40 | // SECOND: define weak_odr {{.*}} void @__omp_offloading_{{.*}}_main |
41 | // SECOND-NEXT: ret void |
42 | |