20 void *Mem =
C.Allocate(
21 OpenACCComputeConstruct::totalSizeToAlloc<const OpenACCClause *>(
31 void *Mem =
C.Allocate(
32 OpenACCComputeConstruct::totalSizeToAlloc<const OpenACCClause *>(
35 Clauses, StructuredBlock);
39OpenACCLoopConstruct::OpenACCLoopConstruct(
unsigned NumClauses)
44 std::uninitialized_value_construct(
45 getTrailingObjects<const OpenACCClause *>(),
46 getTrailingObjects<const OpenACCClause *>() + NumClauses);
48 MutableArrayRef(getTrailingObjects<const OpenACCClause *>(), NumClauses));
51OpenACCLoopConstruct::OpenACCLoopConstruct(
58 ParentComputeConstructKind(ParentKind) {
61 assert((
Loop ==
nullptr || isa<ForStmt, CXXForRangeStmt>(
Loop)) &&
62 "Associated Loop not a for loop?");
64 std::uninitialized_copy(Clauses.begin(), Clauses.end(),
65 getTrailingObjects<const OpenACCClause *>());
72 unsigned NumClauses) {
74 C.Allocate(OpenACCLoopConstruct::totalSizeToAlloc<const OpenACCClause *>(
85 C.Allocate(OpenACCLoopConstruct::totalSizeToAlloc<const OpenACCClause *>(
87 auto *Inst =
new (Mem)
94 unsigned NumClauses) {
95 void *Mem =
C.Allocate(
96 OpenACCCombinedConstruct::totalSizeToAlloc<const OpenACCClause *>(
106 void *Mem =
C.Allocate(
107 OpenACCCombinedConstruct::totalSizeToAlloc<const OpenACCClause *>(
109 auto *Inst =
new (Mem)
115 unsigned NumClauses) {
117 C.Allocate(OpenACCDataConstruct::totalSizeToAlloc<const OpenACCClause *>(
127 Stmt *StructuredBlock) {
129 C.Allocate(OpenACCDataConstruct::totalSizeToAlloc<const OpenACCClause *>(
131 auto *Inst =
new (Mem)
138 unsigned NumClauses) {
139 void *Mem =
C.Allocate(
140 OpenACCEnterDataConstruct::totalSizeToAlloc<const OpenACCClause *>(
149 void *Mem =
C.Allocate(
150 OpenACCEnterDataConstruct::totalSizeToAlloc<const OpenACCClause *>(
159 unsigned NumClauses) {
160 void *Mem =
C.Allocate(
161 OpenACCExitDataConstruct::totalSizeToAlloc<const OpenACCClause *>(
170 void *Mem =
C.Allocate(
171 OpenACCExitDataConstruct::totalSizeToAlloc<const OpenACCClause *>(
180 unsigned NumClauses) {
181 void *Mem =
C.Allocate(
182 OpenACCHostDataConstruct::totalSizeToAlloc<const OpenACCClause *>(
191 Stmt *StructuredBlock) {
192 void *Mem =
C.Allocate(
193 OpenACCHostDataConstruct::totalSizeToAlloc<const OpenACCClause *>(
196 Clauses, StructuredBlock);
202 unsigned NumClauses) {
203 void *Mem =
C.Allocate(
204 OpenACCWaitConstruct::totalSizeToAlloc<Expr *, OpenACCClause *>(
205 NumExprs, NumClauses));
217 assert(llvm::all_of(QueueIdExprs, [](
Expr *
E) {
return E !=
nullptr; }));
219 void *Mem =
C.Allocate(
220 OpenACCWaitConstruct::totalSizeToAlloc<Expr *, OpenACCClause *>(
221 QueueIdExprs.size() + 1, Clauses.size()));
223 auto *Inst =
new (Mem)
225 QueuesLoc, QueueIdExprs, RParenLoc, End, Clauses);
229 unsigned NumClauses) {
231 C.Allocate(OpenACCInitConstruct::totalSizeToAlloc<const OpenACCClause *>(
242 C.Allocate(OpenACCInitConstruct::totalSizeToAlloc<const OpenACCClause *>(
250 unsigned NumClauses) {
251 void *Mem =
C.Allocate(
252 OpenACCShutdownConstruct::totalSizeToAlloc<const OpenACCClause *>(
261 void *Mem =
C.Allocate(
262 OpenACCShutdownConstruct::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 represents one expression.
This is a base class for any OpenACC statement-level constructs that have an associated statement.
static OpenACCCombinedConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCCombinedConstruct * Create(const ASTContext &C, OpenACCDirectiveKind K, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses, Stmt *StructuredBlock)
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)
static OpenACCComputeConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
void setClauseList(MutableArrayRef< const OpenACCClause * > NewClauses)
static OpenACCDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCDataConstruct * Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses, Stmt *StructuredBlock)
static OpenACCEnterDataConstruct * Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses)
static OpenACCEnterDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCExitDataConstruct * Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses)
static OpenACCExitDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCHostDataConstruct * Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses, Stmt *StructuredBlock)
static OpenACCHostDataConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCInitConstruct * Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses)
static OpenACCInitConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
This class represents a 'loop' construct.
static OpenACCLoopConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCLoopConstruct * Create(const ASTContext &C, OpenACCDirectiveKind ParentKind, SourceLocation BeginLoc, SourceLocation DirLoc, SourceLocation EndLoc, ArrayRef< const OpenACCClause * > Clauses, Stmt *Loop)
static OpenACCShutdownConstruct * CreateEmpty(const ASTContext &C, unsigned NumClauses)
static OpenACCShutdownConstruct * Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses)
static OpenACCWaitConstruct * CreateEmpty(const ASTContext &C, unsigned NumExprs, unsigned NumClauses)
static OpenACCWaitConstruct * Create(const ASTContext &C, SourceLocation Start, SourceLocation DirectiveLoc, SourceLocation LParenLoc, Expr *DevNumExpr, SourceLocation QueuesLoc, ArrayRef< Expr * > QueueIdExprs, SourceLocation RParenLoc, SourceLocation End, ArrayRef< const OpenACCClause * > Clauses)
Encodes a location in the source.
Stmt - This represents one statement.
The JSON file list parser is used to communicate input to InstallAPI.