13#ifndef LLVM_CLANG_AST_STMTOPENACC_H
14#define LLVM_CLANG_AST_STMTOPENACC_H
43 :
Stmt(SC), Kind(K), Range(Start, End) {}
48 assert(Clauses.empty() &&
"Cannot change clause list");
56 return S->getStmtClass() >= firstOpenACCConstructStmtConstant &&
57 S->getStmtClass() <= lastOpenACCConstructStmtConstant;
80 Stmt *AssociatedStmt =
nullptr;
98 return child_range(&AssociatedStmt, &AssociatedStmt + 1);
119 public llvm::TrailingObjects<OpenACCComputeConstruct,
120 const OpenACCClause *> {
132 std::uninitialized_value_construct(
133 getTrailingObjects<const OpenACCClause *>(),
134 getTrailingObjects<const OpenACCClause *>() + NumClauses);
142 Stmt *StructuredBlock)
144 End, StructuredBlock) {
146 "Only parallel, serial, and kernels constructs should be "
147 "represented by this type");
150 std::uninitialized_copy(Clauses.begin(), Clauses.end(),
151 getTrailingObjects<const OpenACCClause *>());
161 return T->getStmtClass() == OpenACCComputeConstructClass;
165 unsigned NumClauses);
169 Stmt *StructuredBlock);
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.
OpenACCAssociatedStmtConstruct(StmtClass SC, OpenACCDirectiveKind K, SourceLocation Start, SourceLocation End, Stmt *AssocStmt)
void setAssociatedStmt(Stmt *S)
Stmt * getAssociatedStmt()
const_child_range children() const
const Stmt * getAssociatedStmt() const
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
static bool classof(const Stmt *S)
OpenACCConstructStmt(StmtClass SC, OpenACCDirectiveKind K, SourceLocation Start, SourceLocation End)
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
'copyin' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
bool isOpenACCComputeDirectiveKind(OpenACCDirectiveKind K)
const FunctionProtoType * T