@@ -2304,6 +2304,69 @@ class OMPParallelMasterDirective : public OMPExecutableDirective {
23042304 }
23052305};
23062306
2307+ // / This represents '#pragma omp parallel masked' directive.
2308+ // /
2309+ // / \code
2310+ // / #pragma omp parallel masked filter(tid)
2311+ // / \endcode
2312+ // / In this example directive '#pragma omp parallel masked' has a clause
2313+ // / 'filter' with the variable tid
2314+ // /
2315+ class OMPParallelMaskedDirective final : public OMPExecutableDirective {
2316+ friend class ASTStmtReader ;
2317+ friend class OMPExecutableDirective ;
2318+
2319+ OMPParallelMaskedDirective (SourceLocation StartLoc, SourceLocation EndLoc)
2320+ : OMPExecutableDirective(OMPParallelMaskedDirectiveClass,
2321+ llvm::omp::OMPD_parallel_masked, StartLoc,
2322+ EndLoc) {}
2323+
2324+ explicit OMPParallelMaskedDirective ()
2325+ : OMPExecutableDirective(OMPParallelMaskedDirectiveClass,
2326+ llvm::omp::OMPD_parallel_masked,
2327+ SourceLocation (), SourceLocation()) {}
2328+
2329+ // / Sets special task reduction descriptor.
2330+ void setTaskReductionRefExpr (Expr *E) { Data->getChildren ()[0 ] = E; }
2331+
2332+ public:
2333+ // / Creates directive with a list of \a Clauses.
2334+ // /
2335+ // / \param C AST context.
2336+ // / \param StartLoc Starting location of the directive kind.
2337+ // / \param EndLoc Ending Location of the directive.
2338+ // / \param Clauses List of clauses.
2339+ // / \param AssociatedStmt Statement, associated with the directive.
2340+ // / \param TaskRedRef Task reduction special reference expression to handle
2341+ // / taskgroup descriptor.
2342+ // /
2343+ static OMPParallelMaskedDirective *
2344+ Create (const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2345+ ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef);
2346+
2347+ // / Creates an empty directive with the place for \a NumClauses
2348+ // / clauses.
2349+ // /
2350+ // / \param C AST context.
2351+ // / \param NumClauses Number of clauses.
2352+ // /
2353+ static OMPParallelMaskedDirective *
2354+ CreateEmpty (const ASTContext &C, unsigned NumClauses, EmptyShell);
2355+
2356+ // / Returns special task reduction reference expression.
2357+ Expr *getTaskReductionRefExpr () {
2358+ return cast_or_null<Expr>(Data->getChildren ()[0 ]);
2359+ }
2360+ const Expr *getTaskReductionRefExpr () const {
2361+ return const_cast <OMPParallelMaskedDirective *>(this )
2362+ ->getTaskReductionRefExpr ();
2363+ }
2364+
2365+ static bool classof (const Stmt *T) {
2366+ return T->getStmtClass () == OMPParallelMaskedDirectiveClass;
2367+ }
2368+ };
2369+
23072370// / This represents '#pragma omp parallel sections' directive.
23082371// /
23092372// / \code
0 commit comments