blob: c9829ce4572adeef6d55174b6d26fcfce0bfb42c [file] [log] [blame]
Stephen Hines651f13c2014-04-23 16:59:28 -07001// RUN: %clang_cc1 -fopenmp=libiomp5 -verify -DFOPENMP -o - %s
Douglas Gregor50a70cd2013-01-15 06:45:29 +00002// RUN: %clang_cc1 -verify -o - %s
3// expected-no-diagnostics
4#ifdef FOPENMP
Stephen Hines651f13c2014-04-23 16:59:28 -07005// -fopenmp=libiomp5 option is specified
Douglas Gregor50a70cd2013-01-15 06:45:29 +00006#ifndef _OPENMP
7#error "No _OPENMP macro is defined with -fopenmp option"
Stephen Hines651f13c2014-04-23 16:59:28 -07008#elsif _OPENMP != 201307
Douglas Gregor50a70cd2013-01-15 06:45:29 +00009#error "_OPENMP has incorrect value"
Alexey Bataevc6400582013-03-22 06:34:35 +000010#endif //_OPENMP
11#else
Stephen Hines651f13c2014-04-23 16:59:28 -070012// No -fopenmp=libiomp5 option is specified
Alexey Bataevc6400582013-03-22 06:34:35 +000013#ifdef _OPENMP
14#error "_OPENMP macro is defined without -fopenmp option"
15#endif // _OPENMP
16#endif // FOPENMP
17
Stephen Hines651f13c2014-04-23 16:59:28 -070018// RUN: %clang_cc1 -fopenmp=libiomp5 -verify -DFOPENMP -o - %s
Alexey Bataevc6400582013-03-22 06:34:35 +000019// RUN: %clang_cc1 -verify -o - %s
20// expected-no-diagnostics
21#ifdef FOPENMP
Stephen Hines651f13c2014-04-23 16:59:28 -070022// -fopenmp=libiomp5 option is specified
Alexey Bataevc6400582013-03-22 06:34:35 +000023#ifndef _OPENMP
24#error "No _OPENMP macro is defined with -fopenmp option"
Stephen Hines651f13c2014-04-23 16:59:28 -070025#elsif _OPENMP != 201307
Alexey Bataevc6400582013-03-22 06:34:35 +000026#error "_OPENMP has incorrect value"
Alexey Bataev08f85392013-03-22 05:24:29 +000027#endif // _OPENMP
Douglas Gregor50a70cd2013-01-15 06:45:29 +000028#else
Stephen Hines651f13c2014-04-23 16:59:28 -070029// No -fopenmp=libiomp5 option is specified
Douglas Gregor50a70cd2013-01-15 06:45:29 +000030#ifdef _OPENMP
31#error "_OPENMP macro is defined without -fopenmp option"
32#endif // _OPENMP
33#endif // FOPENMP