Douglas Gregor | 50a70cd | 2013-01-15 06:45:29 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s |
| 2 | // RUN: %clang_cc1 -verify -o - %s |
| 3 | // expected-no-diagnostics |
| 4 | #ifdef FOPENMP |
| 5 | // -fopenmp option is specified |
| 6 | #ifndef _OPENMP |
| 7 | #error "No _OPENMP macro is defined with -fopenmp option" |
| 8 | #elsif _OPENMP != 201107 |
| 9 | #error "_OPENMP has incorrect value" |
Alexey Bataev | c640058 | 2013-03-22 06:34:35 +0000 | [diff] [blame^] | 10 | #endif //_OPENMP |
| 11 | #else |
| 12 | // No -fopenmp option is specified |
| 13 | #ifdef _OPENMP |
| 14 | #error "_OPENMP macro is defined without -fopenmp option" |
| 15 | #endif // _OPENMP |
| 16 | #endif // FOPENMP |
| 17 | |
| 18 | // RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s |
| 19 | // RUN: %clang_cc1 -verify -o - %s |
| 20 | // expected-no-diagnostics |
| 21 | #ifdef FOPENMP |
| 22 | // -fopenmp option is specified |
| 23 | #ifndef _OPENMP |
| 24 | #error "No _OPENMP macro is defined with -fopenmp option" |
| 25 | #elsif _OPENMP != 201107 |
| 26 | #error "_OPENMP has incorrect value" |
Alexey Bataev | 08f8539 | 2013-03-22 05:24:29 +0000 | [diff] [blame] | 27 | #endif // _OPENMP |
Douglas Gregor | 50a70cd | 2013-01-15 06:45:29 +0000 | [diff] [blame] | 28 | #else |
| 29 | // No -fopenmp option is specified |
| 30 | #ifdef _OPENMP |
| 31 | #error "_OPENMP macro is defined without -fopenmp option" |
| 32 | #endif // _OPENMP |
| 33 | #endif // FOPENMP |
| 34 | |