[flang-commits] [flang] [flang][OpenMP] Use OmpDirectiveSpecification in simple directives (PR #131162)

Mats Petersson via flang-commits flang-commits at lists.llvm.org
Fri Mar 14 05:49:04 PDT 2025


================
@@ -1198,24 +1228,32 @@ TYPE_PARSER(sourced( //
         verbatim("FLUSH"_tok), maybe(parenthesized(Parser<OmpObjectList>{})),
         Parser<OmpClauseList>{}, pure(/*TrailingClauses=*/true))))
 
-// Simple Standalone Directives
-TYPE_PARSER(sourced(construct<OmpSimpleStandaloneDirective>(first(
-    "BARRIER" >> pure(llvm::omp::Directive::OMPD_barrier),
-    "ORDERED" >> pure(llvm::omp::Directive::OMPD_ordered),
-    "SCAN" >> pure(llvm::omp::Directive::OMPD_scan),
-    "TARGET ENTER DATA" >> pure(llvm::omp::Directive::OMPD_target_enter_data),
-    "TARGET EXIT DATA" >> pure(llvm::omp::Directive::OMPD_target_exit_data),
-    "TARGET UPDATE" >> pure(llvm::omp::Directive::OMPD_target_update),
-    "TASKWAIT" >> pure(llvm::omp::Directive::OMPD_taskwait),
-    "TASKYIELD" >> pure(llvm::omp::Directive::OMPD_taskyield)))))
+static bool IsSimpleStandalone(const OmpDirectiveName &name) {
----------------
Leporacanthicus wrote:

That makes sense. I just thought I'd mention it before it's a massive nightmare to change, because it sounds like there's more of this to come.... 

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


More information about the flang-commits mailing list