diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-01-15 06:45:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-01-15 06:45:29 +0000 |
commit | 50a70cd11801fd9a700d06e447095249c34c261f (patch) | |
tree | 2e0415b4d735e9927db3a5a974737a395f9c5ca3 /lib/Frontend/InitPreprocessor.cpp | |
parent | 5c52166525f8714c3e3a979b156ec23426947fd3 (diff) |
Add -fopenmp -cc1 option and wire it up to define _OPENMP, from Alexey Bataev!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172509 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | lib/Frontend/InitPreprocessor.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index 886b212bc2..3646e27a49 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp @@ -641,6 +641,16 @@ static void InitializePredefinedMacros(const TargetInfo &TI, "__attribute__((objc_ownership(none)))"); } + // 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. + Builder.defineMacro("_OPENMP", "201107"); + } + // Get other target #defines. TI.getTargetDefines(LangOpts, Builder); } |