18 using namespace clang;
24 #define OPENMP_CLAUSE(Name, Class) \
26 return static_cast<Class *>(this)->children();
27 #include "clang/Basic/OpenMPKinds.def"
29 llvm_unreachable(
"unknown OMPClause");
41 case OMPC_dist_schedule:
43 case OMPC_firstprivate:
45 case OMPC_lastprivate:
55 case OMPC_num_threads:
63 case OMPC_copyprivate:
81 case OMPC_thread_limit:
92 case OMPC_use_device_ptr:
93 case OMPC_is_device_ptr:
107 case OMPC_lastprivate:
114 case OMPC_dist_schedule:
115 case OMPC_firstprivate:
120 case OMPC_num_threads:
128 case OMPC_copyprivate:
146 case OMPC_thread_limit:
152 case OMPC_defaultmap:
157 case OMPC_use_device_ptr:
158 case OMPC_is_device_ptr:
167 "Number of private copies is not the same as the preallocated buffer");
176 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(2 * VL.size()));
180 Clause->setPrivateCopies(PrivateVL);
186 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(2 * N));
192 "Number of private copies is not the same as the preallocated buffer");
198 "Number of inits is not the same as the preallocated buffer");
199 std::copy(VL.begin(), VL.end(), getPrivateCopies().end());
207 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(3 * VL.size()));
211 Clause->setPrivateCopies(PrivateVL);
212 Clause->setInits(InitVL);
219 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(3 * N));
225 "Number of private copies is not the same as the preallocated buffer");
226 std::copy(PrivateCopies.begin(), PrivateCopies.end(),
varlist_end());
230 assert(SrcExprs.size() ==
varlist_size() &&
"Number of source expressions is "
231 "not the same as the "
232 "preallocated buffer");
233 std::copy(SrcExprs.begin(), SrcExprs.end(), getPrivateCopies().end());
237 assert(DstExprs.size() ==
varlist_size() &&
"Number of destination "
238 "expressions is not the same as "
239 "the preallocated buffer");
240 std::copy(DstExprs.begin(), DstExprs.end(), getSourceExprs().end());
243 void OMPLastprivateClause::setAssignmentOps(
ArrayRef<Expr *> AssignmentOps) {
245 "Number of assignment expressions is not the same as the preallocated "
247 std::copy(AssignmentOps.begin(), AssignmentOps.end(),
248 getDestinationExprs().end());
256 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(5 * VL.size()));
260 Clause->setSourceExprs(SrcExprs);
261 Clause->setDestinationExprs(DstExprs);
262 Clause->setAssignmentOps(AssignmentOps);
270 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(5 * N));
279 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(VL.size()));
287 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(N));
293 "Number of privates is not the same as the preallocated buffer");
299 "Number of inits is not the same as the preallocated buffer");
300 std::copy(IL.begin(), IL.end(),
getPrivates().end());
305 "Number of updates is not the same as the preallocated buffer");
306 std::copy(UL.begin(), UL.end(),
getInits().end());
311 "Number of final updates is not the same as the preallocated buffer");
312 std::copy(FL.begin(), FL.end(),
getUpdates().end());
323 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(5 * VL.size() + 2));
325 StartLoc, LParenLoc, Modifier, ModifierLoc, ColonLoc, EndLoc, VL.size());
327 Clause->setPrivates(PL);
328 Clause->setInits(IL);
331 std::fill(Clause->getInits().end(), Clause->getInits().end() + VL.size(),
333 std::fill(Clause->getUpdates().end(), Clause->getUpdates().end() + VL.size(),
335 Clause->setStep(Step);
336 Clause->setCalcStep(CalcStep);
346 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(5 * NumVars + 2));
354 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(VL.size() + 1));
357 Clause->setVarRefs(VL);
358 Clause->setAlignment(A);
364 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(NumVars + 1));
369 assert(SrcExprs.size() == varlist_size() &&
"Number of source expressions is "
370 "not the same as the "
371 "preallocated buffer");
372 std::copy(SrcExprs.begin(), SrcExprs.end(), varlist_end());
376 assert(DstExprs.size() == varlist_size() &&
"Number of destination "
377 "expressions is not the same as "
378 "the preallocated buffer");
379 std::copy(DstExprs.begin(), DstExprs.end(), getSourceExprs().end());
383 assert(AssignmentOps.size() == varlist_size() &&
384 "Number of assignment expressions is not the same as the preallocated "
386 std::copy(AssignmentOps.begin(), AssignmentOps.end(),
387 getDestinationExprs().end());
392 SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> SrcExprs,
393 ArrayRef<Expr *> DstExprs, ArrayRef<Expr *> AssignmentOps) {
394 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(4 * VL.size()));
397 Clause->setVarRefs(VL);
398 Clause->setSourceExprs(SrcExprs);
399 Clause->setDestinationExprs(DstExprs);
400 Clause->setAssignmentOps(AssignmentOps);
405 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(4 * N));
410 assert(SrcExprs.size() == varlist_size() &&
"Number of source expressions is "
411 "not the same as the "
412 "preallocated buffer");
413 std::copy(SrcExprs.begin(), SrcExprs.end(), varlist_end());
417 assert(DstExprs.size() == varlist_size() &&
"Number of destination "
418 "expressions is not the same as "
419 "the preallocated buffer");
420 std::copy(DstExprs.begin(), DstExprs.end(), getSourceExprs().end());
423 void OMPCopyprivateClause::setAssignmentOps(
ArrayRef<Expr *> AssignmentOps) {
424 assert(AssignmentOps.size() == varlist_size() &&
425 "Number of assignment expressions is not the same as the preallocated "
427 std::copy(AssignmentOps.begin(), AssignmentOps.end(),
428 getDestinationExprs().end());
433 SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> SrcExprs,
434 ArrayRef<Expr *> DstExprs, ArrayRef<Expr *> AssignmentOps) {
435 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(4 * VL.size()));
438 Clause->setVarRefs(VL);
439 Clause->setSourceExprs(SrcExprs);
440 Clause->setDestinationExprs(DstExprs);
441 Clause->setAssignmentOps(AssignmentOps);
447 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(4 * N));
453 "Number of private copies is not the same as the preallocated buffer");
454 std::copy(Privates.begin(), Privates.end(),
varlist_end());
460 "Number of LHS expressions is not the same as the preallocated buffer");
461 std::copy(LHSExprs.begin(), LHSExprs.end(), getPrivates().end());
467 "Number of RHS expressions is not the same as the preallocated buffer");
468 std::copy(RHSExprs.begin(), RHSExprs.end(), getLHSExprs().end());
472 assert(ReductionOps.size() ==
varlist_size() &&
"Number of reduction "
473 "expressions is not the same "
474 "as the preallocated buffer");
475 std::copy(ReductionOps.begin(), ReductionOps.end(), getRHSExprs().end());
485 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(5 * VL.size()));
487 StartLoc, LParenLoc, EndLoc, ColonLoc, VL.size(), QualifierLoc, NameInfo);
489 Clause->setPrivates(Privates);
490 Clause->setLHSExprs(LHSExprs);
491 Clause->setRHSExprs(RHSExprs);
492 Clause->setReductionOps(ReductionOps);
500 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(5 * N));
509 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(VL.size() + 1));
512 Clause->setVarRefs(VL);
517 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(N));
525 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(VL.size() + 1));
528 Clause->setVarRefs(VL);
529 Clause->setDependencyKind(DepKind);
530 Clause->setDependencyLoc(DepLoc);
531 Clause->setColonLoc(ColonLoc);
537 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(N + 1));
542 assert(getDependencyKind() == OMPC_DEPEND_sink ||
543 getDependencyKind() == OMPC_DEPEND_source || V ==
nullptr);
544 *getVarRefs().end() = V;
548 auto *V = *getVarRefs().end();
549 assert(getDependencyKind() == OMPC_DEPEND_sink ||
550 getDependencyKind() == OMPC_DEPEND_source || V ==
nullptr);
555 auto *V = *getVarRefs().end();
556 assert(getDependencyKind() == OMPC_DEPEND_sink ||
557 getDependencyKind() == OMPC_DEPEND_source || V ==
nullptr);
563 unsigned TotalNum = 0u;
564 for (
auto &C : ComponentLists)
565 TotalNum += C.size();
570 ArrayRef<ValueDecl *> Declarations) {
571 unsigned TotalNum = 0u;
572 llvm::SmallPtrSet<const ValueDecl *, 8>
Cache;
573 for (
auto *D : Declarations) {
574 const ValueDecl *VD = D ? cast<ValueDecl>(D->getCanonicalDecl()) :
nullptr;
591 unsigned NumVars = Vars.size();
592 unsigned NumUniqueDeclarations =
593 getUniqueDeclarationsTotalNumber(Declarations);
594 unsigned NumComponentLists = ComponentLists.size();
595 unsigned NumComponents = getComponentsTotalNumber(ComponentLists);
610 NumVars, NumUniqueDeclarations,
611 NumUniqueDeclarations + NumComponentLists, NumComponents));
613 TypeModifier, Type, TypeIsImplicit, TypeLoc, StartLoc, LParenLoc, EndLoc,
614 NumVars, NumUniqueDeclarations, NumComponentLists, NumComponents);
616 Clause->setVarRefs(Vars);
618 Clause->setMapTypeModifier(TypeModifier);
619 Clause->setMapType(Type);
620 Clause->setMapLoc(TypeLoc);
625 unsigned NumUniqueDeclarations,
626 unsigned NumComponentLists,
627 unsigned NumComponents) {
631 NumVars, NumUniqueDeclarations,
632 NumUniqueDeclarations + NumComponentLists, NumComponents));
633 return new (Mem)
OMPMapClause(NumVars, NumUniqueDeclarations,
634 NumComponentLists, NumComponents);
642 unsigned NumVars = Vars.size();
643 unsigned NumUniqueDeclarations =
644 getUniqueDeclarationsTotalNumber(Declarations);
645 unsigned NumComponentLists = ComponentLists.size();
646 unsigned NumComponents = getComponentsTotalNumber(ComponentLists);
661 NumVars, NumUniqueDeclarations,
662 NumUniqueDeclarations + NumComponentLists, NumComponents));
665 OMPToClause(StartLoc, LParenLoc, EndLoc, NumVars, NumUniqueDeclarations,
666 NumComponentLists, NumComponents);
668 Clause->setVarRefs(Vars);
674 unsigned NumUniqueDeclarations,
675 unsigned NumComponentLists,
676 unsigned NumComponents) {
680 NumVars, NumUniqueDeclarations,
681 NumUniqueDeclarations + NumComponentLists, NumComponents));
682 return new (Mem)
OMPToClause(NumVars, NumUniqueDeclarations,
683 NumComponentLists, NumComponents);
691 unsigned NumVars = Vars.size();
692 unsigned NumUniqueDeclarations =
693 getUniqueDeclarationsTotalNumber(Declarations);
694 unsigned NumComponentLists = ComponentLists.size();
695 unsigned NumComponents = getComponentsTotalNumber(ComponentLists);
710 NumVars, NumUniqueDeclarations,
711 NumUniqueDeclarations + NumComponentLists, NumComponents));
714 OMPFromClause(StartLoc, LParenLoc, EndLoc, NumVars, NumUniqueDeclarations,
715 NumComponentLists, NumComponents);
717 Clause->setVarRefs(Vars);
723 unsigned NumUniqueDeclarations,
724 unsigned NumComponentLists,
725 unsigned NumComponents) {
729 NumVars, NumUniqueDeclarations,
730 NumUniqueDeclarations + NumComponentLists, NumComponents));
731 return new (Mem)
OMPFromClause(NumVars, NumUniqueDeclarations,
732 NumComponentLists, NumComponents);
740 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(VL.size()));
743 Clause->setVarRefs(VL);
749 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(N));
758 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(VL.size()));
761 Clause->setVarRefs(VL);
767 void *Mem = C.
Allocate(totalSizeToAlloc<Expr *>(N));
static OMPPrivateClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > PrivateVL)
Creates clause with a list of variables VL.
static OMPDependClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
Defines the clang::ASTContext interface.
static OMPReductionClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, ArrayRef< Expr * > Privates, ArrayRef< Expr * > LHSExprs, ArrayRef< Expr * > RHSExprs, ArrayRef< Expr * > ReductionOps, Stmt *PreInit, Expr *PostUpdate)
Creates clause with a list of variables VL.
static OMPToClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > Vars, ArrayRef< ValueDecl * > Declarations, MappableExprComponentListsRef ComponentLists)
Creates clause with a list of variables Vars.
static OMPCopyinClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
This represents clause 'copyin' in the '#pragma omp ...' directives.
static OMPClauseWithPreInit * get(OMPClause *C)
Class that handles pre-initialization statement for some clauses, like 'shedule', 'firstprivate' etc...
static OMPCopyprivateClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > SrcExprs, ArrayRef< Expr * > DstExprs, ArrayRef< Expr * > AssignmentOps)
Creates clause with a list of variables VL.
static OMPFirstprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
llvm::iterator_range< child_iterator > child_range
static OMPCopyinClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > SrcExprs, ArrayRef< Expr * > DstExprs, ArrayRef< Expr * > AssignmentOps)
Creates clause with a list of variables VL.
static OMPMapClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for for NumVars original expressions, NumUniqueDeclarations de...
TypePropertyCache< Private > Cache
The base class of the type hierarchy.
static OMPUseDevicePtrClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
static OMPReductionClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
This represents clause 'private' in the '#pragma omp ...' directives.
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
void setClauseInfo(ArrayRef< ValueDecl * > Declarations, MappableExprComponentListsRef ComponentLists)
Fill the clause information from the list of declarations and associated component lists...
Base wrapper for a particular "section" of type source info.
static OMPSharedClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL)
Creates clause with a list of variables VL.
clang::OMPLinearClause OMPVarListClause, OMPClauseWithPostUpdate, llvm::TrailingObjects getPrivates()
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
OpenMPLinearClauseKind
OpenMP attributes for 'linear' clause.
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
void setUpdates(ArrayRef< Expr * > UL)
Sets the list of update expressions for linear variables.
This represents clause 'map' in the '#pragma omp ...' directives.
This represents clause 'to' in the '#pragma omp ...' directives.
void setPreInitStmt(Stmt *S)
Set pre-initialization statement for the clause.
Expr * getCounterValue()
Get the loop counter value.
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
static OMPIsDevicePtrClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
void setFinals(ArrayRef< Expr * > FL)
Sets the list of final update expressions for linear variables.
static unsigned getComponentsTotalNumber(MappableExprComponentListsRef ComponentLists)
static OMPToClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for NumVars variables.
Class that handles post-update expression for some clauses, like 'lastprivate', 'reduction' etc...
This represents clause 'reduction' in the '#pragma omp ...' directives.
This represents clause 'is_device_ptr' in the '#pragma omp ...' directives.
This represents clause 'from' in the '#pragma omp ...' directives.
OpenMPClauseKind getClauseKind() const
Returns kind of OpenMP clause (private, shared, reduction, etc.).
This represents clause 'aligned' in the '#pragma omp ...' directives.
static OMPAlignedClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
static OMPIsDevicePtrClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL)
Creates clause with a list of variables VL.
This represents implicit clause 'depend' for the '#pragma omp task' directive.
static OMPFlushClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL)
Creates clause with a list of variables VL.
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Expr - This represents one expression.
MutableArrayRef< Expr * > getUpdates()
Sets the list of update expressions for linear variables.
void setInits(ArrayRef< Expr * > IL)
Sets the list of the initial values for linear variables.
static OMPFlushClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
static OMPLinearClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
void setPrivateCopies(ArrayRef< Expr * > PrivateCopies)
Set list of helper expressions, required for generation of private copies of original lastprivate var...
static OMPPrivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
static OMPDependClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, OpenMPDependClauseKind DepKind, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VL)
Creates clause with a list of variables VL.
This file defines OpenMP AST classes for clauses.
void setPostUpdateExpr(Expr *S)
Set pre-initialization statement for the clause.
static OMPFirstprivateClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > PrivateVL, ArrayRef< Expr * > InitVL, Stmt *PreInit)
Creates clause with a list of variables VL.
Encodes a location in the source.
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
MutableArrayRef< Expr * > getInits()
void setVarRefs(ArrayRef< Expr * > VL)
Sets the list of variables for this clause.
This represents 'schedule' clause in the '#pragma omp ...' directive.
static OMPLinearClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind Modifier, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > PL, ArrayRef< Expr * > IL, Expr *Step, Expr *CalcStep, Stmt *PreInit, Expr *PostUpdate)
Creates clause with a list of variables VL and a linear step Step.
This represents clause 'shared' in the '#pragma omp ...' directives.
OpenMPLinearClauseKind Modifier
Modifier of 'linear' clause.
This is a basic class for representing single OpenMP clause.
static OMPFromClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > Vars, ArrayRef< ValueDecl * > Declarations, MappableExprComponentListsRef ComponentLists)
Creates clause with a list of variables Vars.
static OMPAlignedClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, Expr *A)
Creates clause with a list of variables VL and alignment A.
SourceLocation ModifierLoc
Location of linear modifier if any.
ArrayRef< MappableExprComponentList > MappableExprComponentListsRef
void setCounterValue(Expr *V)
Set the loop counter value for the depend clauses with 'sink|source' kind of dependency.
This represents clause 'linear' in the '#pragma omp ...' directives.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
static OMPSharedClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
static OMPCopyprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
static OMPLastprivateClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > SrcExprs, ArrayRef< Expr * > DstExprs, ArrayRef< Expr * > AssignmentOps, Stmt *PreInit, Expr *PostUpdate)
Creates clause with a list of variables VL.
static OMPUseDevicePtrClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL)
Creates clause with a list of variables VL.
static unsigned getUniqueDeclarationsTotalNumber(ArrayRef< ValueDecl * > Declarations)
varlist_iterator varlist_end()
Privates[]
Gets the list of initial values for linear variables.
OpenMPMapClauseKind
OpenMP mapping kind for 'map' clause.
void * Allocate(size_t Size, unsigned Align=8) const
static OMPMapClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > Vars, ArrayRef< ValueDecl * > Declarations, MappableExprComponentListsRef ComponentLists, OpenMPMapClauseKind TypeModifier, OpenMPMapClauseKind Type, bool TypeIsImplicit, SourceLocation TypeLoc)
Creates clause with a list of variables VL.
This represents 'dist_schedule' clause in the '#pragma omp ...' directive.
void setPrivates(ArrayRef< Expr * > PL)
Sets the list of the copies of original linear variables.
static OMPFromClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for NumVars variables.
static OMPClauseWithPostUpdate * get(OMPClause *C)
static OMPLastprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
SourceLocation ColonLoc
Location of ':'.
unsigned varlist_size() const
This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.