From 2e3a07fcb87e44140ff1a203da4d77eff1a78e77 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Wed, 7 Aug 2019 14:02:11 +0000 Subject: [OPENMP]Add standard macro value _OPENMP for OpenMP 5.0. According to the OpenMP standard, compiler must define _OPENMP macro, which has value in format yyyymm, where yyyy is the year of the standard and mm is the month of the standard. For OpenMP 5.0 this value must be set to 201811. llvm-svn: 368170 --- clang/lib/Frontend/InitPreprocessor.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/Frontend') diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 3906e2ae1b9..79b5395372f 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -1038,6 +1038,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI, case 45: Builder.defineMacro("_OPENMP", "201511"); break; + case 50: + Builder.defineMacro("_OPENMP", "201811"); + break; default: // Default version is OpenMP 3.1 Builder.defineMacro("_OPENMP", "201107"); -- cgit v1.2.3