[flang] Add predefined macro _OPENMP to 201511 - yyyymm of the OpenMP Spec.
authorHongyon Suauthai <hsuauthai@nvidia.com>
Mon, 23 Jul 2018 17:43:44 +0000 (10:43 -0700)
committerHongyon Suauthai <hsuauthai@nvidia.com>
Mon, 23 Jul 2018 17:43:44 +0000 (10:43 -0700)
Original-commit: flang-compiler/f18@859912b54ed795e063c31ab11d4c1ce45724421b
Reviewed-on: https://github.com/flang-compiler/f18/pull/140

flang/tools/f18/f18.cc

index 7a4eb45..f1771d6 100644 (file)
@@ -356,6 +356,7 @@ int main(int argc, char *const argv[]) {
       options.features.WarnOnAllNonstandard();
     } else if (arg == "-fopenmp") {
       options.features.Enable(Fortran::parser::LanguageFeature::OpenMP);
+      options.predefinitions.emplace_back("_OPENMP", "201511");
     } else if (arg == "-Werror") {
       driver.warningsAreErrors = true;
     } else if (arg == "-ed") {