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