[clang] 50c959b - Add explicit OpenMP 5.0 case for version macros; NFC

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue May 3 07:02:00 PDT 2022


Author: Aaron Ballman
Date: 2022-05-03T10:01:47-04:00
New Revision: 50c959b4fa4288127026a6a908c9a6d74b6f5d11

URL: https://github.com/llvm/llvm-project/commit/50c959b4fa4288127026a6a908c9a6d74b6f5d11
DIFF: https://github.com/llvm/llvm-project/commit/50c959b4fa4288127026a6a908c9a6d74b6f5d11.diff

LOG: Add explicit OpenMP 5.0 case for version macros; NFC

This adds an explicit case for OpenMP 5.0 as a reminder to still define
the correct macro value when the default OpenMP version changes in the
future.

Added: 
    

Modified: 
    clang/lib/Frontend/InitPreprocessor.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index 592e7b0076f7b..847d3667ff37c 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -1249,6 +1249,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
     case 52:
       Builder.defineMacro("_OPENMP", "202111");
       break;
+    case 50:
     default:
       // Default version is OpenMP 5.0
       Builder.defineMacro("_OPENMP", "201811");


        


More information about the cfe-commits mailing list