13#ifndef LLVM_CLANG_AST_STMTOPENACC_H
14#define LLVM_CLANG_AST_STMTOPENACC_H
46 :
Stmt(SC),
Kind(K),
Range(Start, End), DirectiveLoc(DirectiveLoc) {}
51 assert(Clauses.empty() &&
"Cannot change clause list");
59 return S->getStmtClass() >= firstOpenACCConstructStmtConstant &&
60 S->getStmtClass() <= lastOpenACCConstructStmtConstant;
84 Stmt *AssociatedStmt =
nullptr;
92 AssociatedStmt(AssocStmt) {}
108 return child_range(&AssociatedStmt, &AssociatedStmt + 1);
117class OpenACCLoopConstruct;
131 public llvm::TrailingObjects<OpenACCComputeConstruct,
132 const OpenACCClause *> {
144 std::uninitialized_value_construct(
145 getTrailingObjects<const OpenACCClause *>(),
146 getTrailingObjects<const OpenACCClause *>() + NumClauses);
154 Stmt *StructuredBlock)
156 DirectiveLoc, End, StructuredBlock) {
158 "Only parallel, serial, and kernels constructs should be "
159 "represented by this type");
162 std::uninitialized_copy(Clauses.begin(), Clauses.end(),
163 getTrailingObjects<const OpenACCClause *>());
174 void findAndSetChildLoops();
178 return T->getStmtClass() == OpenACCComputeConstructClass;
182 unsigned NumClauses);
199 public llvm::TrailingObjects<OpenACCLoopConstruct,
200 const OpenACCClause *> {
221 assert(!ParentComputeConstruct &&
"Parent already set?");
222 ParentComputeConstruct = CC;
227 return T->getStmtClass() == OpenACCLoopConstructClass;
231 unsigned NumClauses);
249 return ParentComputeConstruct ==
nullptr;
252 return ParentComputeConstruct;
enum clang::sema::@1653::IndirectLocalPathEntry::EntryKind Kind
Defines some OpenACC-specific enums and functions.
Defines the clang::SourceLocation class and associated facilities.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
This is a base class for any OpenACC statement-level constructs that have an associated statement.
void setAssociatedStmt(Stmt *S)
Stmt * getAssociatedStmt()
const_child_range children() const
const Stmt * getAssociatedStmt() const
OpenACCAssociatedStmtConstruct(StmtClass SC, OpenACCDirectiveKind K, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, Stmt *AssocStmt)
static bool classof(const Stmt *T)
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
static OpenACCComputeConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static bool classof(const Stmt *T)
Stmt * getStructuredBlock()
const Stmt * getStructuredBlock() const
This is the base class for an OpenACC statement-level construct, other construct types are expected t...
SourceLocation getEndLoc() const
SourceLocation getBeginLoc() const
OpenACCDirectiveKind getDirectiveKind() const
void setClauseList(MutableArrayRef< const OpenACCClause * > NewClauses)
ArrayRef< const OpenACCClause * > clauses() const
const_child_range children() const
SourceLocation getDirectiveLoc() const
static bool classof(const Stmt *S)
OpenACCConstructStmt(StmtClass SC, OpenACCDirectiveKind K, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End)
This class represents a 'loop' construct.
static OpenACCLoopConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
const Stmt * getLoop() const
bool isOrphanedLoopConstruct() const
OpenACC 3.3 2.9: An orphaned loop construct is a loop construct that is not lexically enclosed within...
const OpenACCComputeConstruct * getParentComputeConstruct() const
static bool classof(const Stmt *T)
A class that does preorder or postorder depth-first traversal on the entire Clang AST and visits each...
Encodes a location in the source.
A trivial tuple used to represent a source range.
Stmt - This represents one statement.
StmtIterator child_iterator
Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatem...
llvm::iterator_range< child_iterator > child_range
llvm::iterator_range< const_child_iterator > const_child_range
The JSON file list parser is used to communicate input to InstallAPI.
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
bool isOpenACCComputeDirectiveKind(OpenACCDirectiveKind K)
const FunctionProtoType * T