[flang-commits] [flang] [flang][OpenMP] Support omx/ompx extension sentinels (PR #218475)

CHANDRA GHALE via flang-commits flang-commits at lists.llvm.org
Wed Aug 26 06:28:28 PDT 2026


================
@@ -198,7 +198,12 @@ class Prescanner {
     return InOpenMPConditionalLine() || InOpenACCOrCUDAConditionalLine();
   }
   bool IsOpenMPDirective() const {
-    return directiveSentinel_ && std::strcmp(directiveSentinel_, "$omp") == 0;
+    return directiveSentinel_ &&
+        (std::strcmp(directiveSentinel_, "$omp") == 0 ||
+            // Implementation-defined extension sentinels (OpenMP 5.2, 3.1):
+            // "$omx" (fixed form) and "$ompx" (free form).
+            std::strcmp(directiveSentinel_, "$omx") == 0 ||
+            std::strcmp(directiveSentinel_, "$ompx") == 0);
----------------
chandraghale wrote:

Done !!! Enforced in IsCompilerDirectiveSentinel.

https://github.com/llvm/llvm-project/pull/218475


More information about the flang-commits mailing list