summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-01-15 06:45:29 +0000
committerDouglas Gregor <dgregor@apple.com>2013-01-15 06:45:29 +0000
commit1517128912cfe5c9e7635424f683f9a6695fcfe0 (patch)
tree3333ea2c3bdc3ec3b2b26efd54afcd0cbdd3958b /clang/lib/Frontend/InitPreprocessor.cpp
parentdaa46eb7361fe3d04d377c3713ce7fe68e0f3113 (diff)
downloadbcm5719-llvm-1517128912cfe5c9e7635424f683f9a6695fcfe0.tar.gz
bcm5719-llvm-1517128912cfe5c9e7635424f683f9a6695fcfe0.zip
Add -fopenmp -cc1 option and wire it up to define _OPENMP, from Alexey Bataev!
llvm-svn: 172509
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index 886b212bc2b..3646e27a491 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud