summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2016-05-26 04:56:05 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2016-05-26 04:56:05 +0000
commit3bfedcffe09c393b1a94f4f58e2d5717122dd421 (patch)
treef5b77337c929f8d24e1f52ad708af87fcc76bcb2
parent91e19a3de4d74d899f3ffc77aace35d4df561373 (diff)
downloadbcm5719-llvm-3bfedcffe09c393b1a94f4f58e2d5717122dd421.tar.gz
bcm5719-llvm-3bfedcffe09c393b1a94f4f58e2d5717122dd421.zip
[OPENMP] Set '_OPENMP' macro to '201511' value to reflect support for
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. llvm-svn: 270822
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp2
-rw-r--r--clang/test/OpenMP/predefined_macro.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index f8b407ba264..9259b1291fe 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -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
diff --git a/clang/test/OpenMP/predefined_macro.c b/clang/test/OpenMP/predefined_macro.c
index 9a961bce552..3b274f2de2a 100644
--- a/clang/test/OpenMP/predefined_macro.c
+++ b/clang/test/OpenMP/predefined_macro.c
@@ -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
OpenPOWER on IntegriCloud