================ @@ -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 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits