21 void *Mem =
C.Allocate(
22 OpenACCComputeConstruct::totalSizeToAlloc<const OpenACCClause *>(
33 void *Mem =
C.Allocate(
34 OpenACCComputeConstruct::totalSizeToAlloc<const OpenACCClause *>(
37 Clauses, StructuredBlock);
40 C->setParentComputeConstruct(Inst);
46void OpenACCComputeConstruct::findAndSetChildLoops() {
51 : Construct(Construct) {}
60 C->setParentComputeConstruct(Construct);
65 LoopConstructFinder f(
this);
69OpenACCLoopConstruct::OpenACCLoopConstruct(
unsigned NumClauses)
74 std::uninitialized_value_construct(
75 getTrailingObjects<const OpenACCClause *>(),
76 getTrailingObjects<const OpenACCClause *>() + NumClauses);
78 MutableArrayRef(getTrailingObjects<const OpenACCClause *>(), NumClauses));
81OpenACCLoopConstruct::OpenACCLoopConstruct(
89 assert((
Loop ==
nullptr || isa<ForStmt, CXXForRangeStmt>(
Loop)) &&
90 "Associated Loop not a for loop?");
92 std::uninitialized_copy(Clauses.begin(), Clauses.end(),
93 getTrailingObjects<const OpenACCClause *>());
99void OpenACCLoopConstruct::setLoop(
Stmt *
Loop) {
100 assert((isa<ForStmt, CXXForRangeStmt>(
Loop)) &&
101 "Associated Loop not a for loop?");
106 unsigned NumClauses) {
108 C.Allocate(OpenACCLoopConstruct::totalSizeToAlloc<const OpenACCClause *>(
120 C.Allocate(OpenACCLoopConstruct::totalSizeToAlloc<const OpenACCClause *>(
Defines the clang::ASTContext interface.
This file defines OpenACC AST classes for statement-level contructs.
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()
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
static OpenACCComputeConstruct * Create(const ASTContext &C, OpenACCDirectiveKind K, SourceLocation BeginLoc, SourceLocation DirectiveLoc, SourceLocation EndLoc, ArrayRef< const OpenACCClause * > Clauses, Stmt *StructuredBlock, ArrayRef< OpenACCLoopConstruct * > AssociatedLoopConstructs)
static OpenACCComputeConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
void setClauseList(MutableArrayRef< const OpenACCClause * > NewClauses)
This class represents a 'loop' construct.
static OpenACCLoopConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCLoopConstruct * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation DirLoc, SourceLocation EndLoc, ArrayRef< const OpenACCClause * > Clauses, Stmt *Loop)
A class that does preorder or postorder depth-first traversal on the entire Clang AST and visits each...
Encodes a location in the source.
Stmt - This represents one statement.
The JSON file list parser is used to communicate input to InstallAPI.