]> granicus.if.org Git - clang/commitdiff
[OPENMP] Set '_OPENMP' macro to '201511' value to reflect support for
authorAlexey Bataev <a.bataev@hotmail.com>
Thu, 26 May 2016 04:56:05 +0000 (04:56 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 26 May 2016 04:56:05 +0000 (04:56 +0000)
OpenMP 4.5.

According to OpenMP 4.5 the _OPENMP macro name is defined to have the decimal value yyyymm where yyyy and mm are the year and month designations of the version of the OpenMP API that the implementation supports. Clang supports OpenMP 4.5 so updated value of _OPENMP macro to 201511.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270822 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/InitPreprocessor.cpp
test/OpenMP/predefined_macro.c

index f8b407ba26481468987b56026d8b599b93799d38..9259b1291fe33488daa440653569fb34c01977b2 100644 (file)
@@ -928,7 +928,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
     //   macro name is defined to have the decimal value yyyymm where
     //   yyyy and mm are the year and the month designations of the
     //   version of the OpenMP API that the implementation support.
-    Builder.defineMacro("_OPENMP", "201307");
+    Builder.defineMacro("_OPENMP", "201511");
   }
 
   // CUDA device path compilaton
index 9a961bce552f23cac4322e53a3ef6eb266501372..3b274f2de2a87f0ef4b05c6a6c45b754e36ceed1 100644 (file)
@@ -5,7 +5,7 @@
 // -fopenmp option is specified
 #ifndef _OPENMP
 #error "No _OPENMP macro is defined with -fopenmp option"
-#elsif _OPENMP != 201307
+#elsif _OPENMP != 201511
 #error "_OPENMP has incorrect value"
 #endif //_OPENMP
 #else