@@ -4688,6 +4688,63 @@ class OMPTargetTeamsDistributeSimdDirective final : public OMPLoopDirective {
46884688 }
46894689};
46904690
4691+ // / This represents '#pragma omp scan' directive.
4692+ // /
4693+ // / \code
4694+ // / #pragma omp scan inclusive(a)
4695+ // / \endcode
4696+ // / In this example directive '#pragma omp scan' has clause 'inclusive' with
4697+ // / list item 'a'.
4698+ class OMPScanDirective final : public OMPExecutableDirective {
4699+ friend class ASTStmtReader ;
4700+ // / Build directive with the given start and end location.
4701+ // /
4702+ // / \param StartLoc Starting location of the directive kind.
4703+ // / \param EndLoc Ending location of the directive.
4704+ // / \param NumClauses Number of clauses.
4705+ // /
4706+ OMPScanDirective (SourceLocation StartLoc, SourceLocation EndLoc,
4707+ unsigned NumClauses)
4708+ : OMPExecutableDirective(this , OMPScanDirectiveClass,
4709+ llvm::omp::OMPD_scan, StartLoc, EndLoc,
4710+ NumClauses, 0 ) {}
4711+
4712+ // / Build an empty directive.
4713+ // /
4714+ // / \param NumClauses Number of clauses.
4715+ // /
4716+ explicit OMPScanDirective (unsigned NumClauses)
4717+ : OMPExecutableDirective(this , OMPScanDirectiveClass,
4718+ llvm::omp::OMPD_scan, SourceLocation(),
4719+ SourceLocation(), NumClauses, 0) {}
4720+
4721+ public:
4722+ // / Creates directive with a list of \a Clauses.
4723+ // /
4724+ // / \param C AST context.
4725+ // / \param StartLoc Starting location of the directive kind.
4726+ // / \param EndLoc Ending Location of the directive.
4727+ // / \param Clauses List of clauses (only single OMPFlushClause clause is
4728+ // / allowed).
4729+ // /
4730+ static OMPScanDirective *Create (const ASTContext &C, SourceLocation StartLoc,
4731+ SourceLocation EndLoc,
4732+ ArrayRef<OMPClause *> Clauses);
4733+
4734+ // / Creates an empty directive with the place for \a NumClauses
4735+ // / clauses.
4736+ // /
4737+ // / \param C AST context.
4738+ // / \param NumClauses Number of clauses.
4739+ // /
4740+ static OMPScanDirective *CreateEmpty (const ASTContext &C, unsigned NumClauses,
4741+ EmptyShell);
4742+
4743+ static bool classof (const Stmt *T) {
4744+ return T->getStmtClass () == OMPScanDirectiveClass;
4745+ }
4746+ };
4747+
46914748} // end namespace clang
46924749
46934750#endif
0 commit comments