Add -fopenmp -cc1 option and wire it up to define _OPENMP, from Alexey Bataev!

llvm-svn: 172509
This commit is contained in:
Douglas Gregor
2013-01-15 06:45:29 +00:00
parent daa46eb736
commit 1517128912
5 changed files with 32 additions and 1 deletions

View File

@@ -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);
}