[llvm-branch-commits] [flang] [flang][OpenMP] Use new modifiers in IF/LASTPRIVATE (PR #118128)

Krzysztof Parzyszek via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 2 05:59:03 PST 2024


================
@@ -16,13 +16,58 @@
 #include "token-parsers.h"
 #include "type-parser-implementation.h"
 #include "flang/Parser/parse-tree.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Frontend/OpenMP/OMP.h"
 
 // OpenMP Directives and Clauses
 namespace Fortran::parser {
 
 constexpr auto startOmpLine = skipStuffBeforeStatement >> "!$OMP "_sptok;
 constexpr auto endOmpLine = space >> endOfLine;
 
+/// Parse OpenMP directive name (this includes compound directives).
+struct OmpDirectiveNameParser {
+  using resultType = llvm::omp::Directive;
----------------
kparzysz wrote:

This spelling is actually mandated by the parsing infrastructure.  See this comment: https://github.com/llvm/llvm-project/blob/main/flang/lib/Parser/basic-parsers.h#L12-L20

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


More information about the llvm-branch-commits mailing list