summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2016-05-27 04:13:39 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2016-05-27 04:13:39 +0000
commit18c48526077e2cb4576e69e45eec3d10d8615bd9 (patch)
tree8182cfa38258d9a4796116406dce8d717c9a3593 /clang/lib/Frontend/InitPreprocessor.cpp
parent873a2ab4becf79cb9b84afdd95c03e8b22e368f5 (diff)
downloadbcm5719-llvm-18c48526077e2cb4576e69e45eec3d10d8615bd9.tar.gz
bcm5719-llvm-18c48526077e2cb4576e69e45eec3d10d8615bd9.zip
[OPENMP] Fixed processing of '-fopenmp-version=' option and test.
llvm-svn: 270962
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index 2ebf9668796..27ef59a0c20 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -922,24 +922,24 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
}
// OpenMP definition
- if (LangOpts.OpenMP) {
- // OpenMP 2.2:
- // In implementations that support a preprocessor, the _OPENMP
- // 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.
- switch (LangOpts.OpenMP) {
- case 40:
- Builder.defineMacro("_OPENMP", "201307");
- break;
- case 45:
- Builder.defineMacro("_OPENMP", "201511");
- break;
- default:
- // Default version is OpenMP 3.1
- Builder.defineMacro("_OPENMP", "201107");
- break;
- }
+ // OpenMP 2.2:
+ // In implementations that support a preprocessor, the _OPENMP
+ // 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.
+ switch (LangOpts.OpenMP) {
+ case 0:
+ break;
+ case 40:
+ Builder.defineMacro("_OPENMP", "201307");
+ break;
+ case 45:
+ Builder.defineMacro("_OPENMP", "201511");
+ break;
+ default:
+ // Default version is OpenMP 3.1
+ Builder.defineMacro("_OPENMP", "201107");
+ break;
}
// CUDA device path compilaton
OpenPOWER on IntegriCloud