From 18c48526077e2cb4576e69e45eec3d10d8615bd9 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Fri, 27 May 2016 04:13:39 +0000 Subject: [OPENMP] Fixed processing of '-fopenmp-version=' option and test. llvm-svn: 270962 --- clang/lib/Frontend/InitPreprocessor.cpp | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'clang/lib/Frontend/InitPreprocessor.cpp') diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 2ebf966..27ef59a 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 -- cgit v1.1