: StartLoc(StartLoc), EndLoc(EndLoc), Kind(K) {}
110template<OpenMPClauseKind ClauseKind>
117:
OMPClause(ClauseKind, StartLoc, EndLoc) {}
139 return T->getClauseKind() == ClauseKind;
143template<OpenMPClauseKind ClauseKind,
classBase>
158:
Base(ClauseKind, StartLoc, EndLoc), LParenLoc(LParenLoc), S(S) {}
163 template<
typenameT>
T*
getStmtAs()
const{
returncast_or_null<T>(S); }
189 return T->getClauseKind() == ClauseKind;
199 Stmt*PreInit =
nullptr;
206assert(
get(This) &&
"get is not tuned for pre-init.");
214CaptureRegion = ThisRegion;
237 Expr*PostUpdate =
nullptr;
241assert(
get(This) &&
"get is not tuned for post-update.");
294:
OMPClause(K, StartLoc, EndLoc), LParenLoc(LParenLoc), NumVars(N) {}
299 static_cast<T*
>(
this)->
templategetTrailingObjects<Expr *>(), NumVars);
304assert(VL.size() == NumVars &&
305 "Number of variables is not the same as the preallocated buffer");
306std::copy(VL.begin(), VL.end(),
307 static_cast<T*
>(
this)->template getTrailingObjects<Expr *>());
340 static_cast<const T*
>(
this)->
templategetTrailingObjects<Expr *>(),
366:
OMPClause(K, StartLoc, EndLoc), LParenLoc(LParenLoc),
386 static_cast<T*
>(
this)
387->
templategetTrailingObjects<OpenMPDirectiveKind>(),
394 "Number of directive kinds is not the same as the preallocated buffer");
395std::copy(DK.begin(), DK.end(),
396 static_cast<T*
>(
this)
397->template getTrailingObjects<OpenMPDirectiveKind>());
474 staticOMPAlignClause *
Create(
constASTContext &
C, Expr *A,
475SourceLocation StartLoc,
476SourceLocation LParenLoc,
477SourceLocation EndLoc);
493 privatellvm::TrailingObjects<OMPAllocateClause, Expr *> {
496 friendTrailingObjects;
500 Expr*Allocator =
nullptr;
503 Expr*Alignment =
nullptr;
514 enum{ FIRST, SECOND, NUM_MODIFIERS };
524Modifiers[FIRST] = M;
531Modifiers[SECOND] = M;
535 voidsetFirstAllocateModifierLoc(SourceLocation
Loc) {
536ModifiersLoc[FIRST] =
Loc;
540 voidsetSecondAllocateModifierLoc(SourceLocation
Loc) {
541ModifiersLoc[SECOND] =
Loc;
554OMPAllocateClause(SourceLocation StartLoc, SourceLocation LParenLoc,
555Expr *Allocator, Expr *Alignment, SourceLocation ColonLoc,
557SourceLocation Modifier1Loc,
559SourceLocation Modifier2Loc, SourceLocation EndLoc,
561: OMPVarListClause<OMPAllocateClause>(
llvm::omp::OMPC_allocate, StartLoc,
562LParenLoc, EndLoc, N),
563Allocator(Allocator), Alignment(Alignment), ColonLoc(ColonLoc) {
564Modifiers[FIRST] = Modifier1;
565Modifiers[SECOND] = Modifier2;
566ModifiersLoc[FIRST] = Modifier1Loc;
567ModifiersLoc[SECOND] = Modifier2Loc;
573 explicitOMPAllocateClause(
unsignedN)
574: OMPVarListClause<OMPAllocateClause>(
llvm::omp::OMPC_allocate,
575SourceLocation(), SourceLocation(),
576SourceLocation(), N) {
582 voidsetColonLoc(SourceLocation CL) { ColonLoc = CL; }
584 voidsetAllocator(Expr *A) { Allocator = A; }
586AllocatorModifier = AM;
588 voidsetAlignment(Expr *A) { Alignment = A; }
602 staticOMPAllocateClause *
603 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
604Expr *Allocator, Expr *Alignment, SourceLocation ColonLoc,
607SourceLocation EndLoc, ArrayRef<Expr *> VL);
617 returnAllocatorModifier;
622 returnModifiers[FIRST];
627 returnModifiersLoc[FIRST];
632 returnModifiers[SECOND];
637 returnModifiersLoc[SECOND];
644 returnAllocatorModifierLoc;
671 return T->getClauseKind() == llvm::omp::OMPC_allocate;
689 Stmt*Condition =
nullptr;
707 voidsetNameModifierLoc(SourceLocation
Loc) { NameModifierLoc =
Loc; }
710 voidsetColonLoc(SourceLocation
Loc) { ColonLoc =
Loc; }
731ColonLoc(ColonLoc), NameModifier(NameModifier),
732NameModifierLoc(NameModifierLoc) {
772 return T->getClauseKind() == llvm::omp::OMPC_if;
835 voidsetNumThreads(
Expr*NThreads) {
setStmt(NThreads); }
943 privatellvm::TrailingObjects<OMPSizesClause, Expr *> {
956NumSizes(NumSizes) {}
988->
templategetTrailingObjects<Expr *>(),
993->
templategetTrailingObjects<Expr *>(),
999assert(VL.size() == NumSizes);
1000std::copy(VL.begin(), VL.end(),
1002->template getTrailingObjects<Expr *>());
1008 reinterpret_cast<Stmt**
>(Sizes.end()));
1013 reinterpret_cast<Stmt*
const*
>(Sizes.end()));
1024 return T->getClauseKind() == llvm::omp::OMPC_sizes;
1038 privatellvm::TrailingObjects<OMPSizesClause, Expr *> {
1051assert(VL.size() == NumLoops &&
"Expecting one expression per loop");
1053->
templategetTrailingObjects<Expr *>());
1060NumLoops(NumLoops) {}
1070 staticOMPPermutationClause *
1071 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
1072SourceLocation EndLoc, ArrayRef<Expr *> Args);
1078 staticOMPPermutationClause *
CreateEmpty(
constASTContext &
C,
1094->
templategetTrailingObjects<Expr *>(),
1099->
templategetTrailingObjects<Expr *>(),
1107 reinterpret_cast<Stmt**
>(Args.end()));
1112 reinterpret_cast<Stmt*
const*
>(Args.end()));
1123 return T->getClauseKind() == llvm::omp::OMPC_permutation;
1174 voidsetFactor(Expr *
E) { Factor =
E; }
1177 voidsetLParenLoc(SourceLocation
Loc) { LParenLoc =
Loc; }
1187 staticOMPPartialClause *
Create(
constASTContext &
C, SourceLocation StartLoc,
1188SourceLocation LParenLoc,
1189SourceLocation EndLoc, Expr *Factor);
1194 staticOMPPartialClause *
CreateEmpty(
constASTContext &
C);
1215 return T->getClauseKind() == llvm::omp::OMPC_partial;
1269llvm::omp::DefaultKind
Kind= llvm::omp::OMP_DEFAULT_unknown;
1277 voidsetDefaultKind(llvm::omp::DefaultKind K) {
Kind= K; }
1282 voidsetDefaultKindKwLoc(
SourceLocationKLoc) { KindKwLoc = KLoc; }
1296LParenLoc(LParenLoc),
Kind(A), KindKwLoc(ALoc) {}
1331 return T->getClauseKind() == llvm::omp::OMPC_default;
1350llvm::omp::ProcBindKind
Kind= llvm::omp::OMP_PROC_BIND_unknown;
1358 voidsetProcBindKind(llvm::omp::ProcBindKind K) {
Kind= K; }
1363 voidsetProcBindKindKwLoc(
SourceLocationKLoc) { KindKwLoc = KLoc; }
1377:
OMPClause(
llvm::omp::OMPC_proc_bind, StartLoc, EndLoc),
1378LParenLoc(LParenLoc),
Kind(A), KindKwLoc(ALoc) {}
1413 return T->getClauseKind() == llvm::omp::OMPC_proc_bind;
1456:
OMPClause(
llvm::omp::OMPC_unified_shared_memory, StartLoc, EndLoc) {}
1479 return T->getClauseKind() == llvm::omp::OMPC_unified_shared_memory;
1499:
OMPClause(
llvm::omp::OMPC_reverse_offload, StartLoc, EndLoc) {}
1522 return T->getClauseKind() == llvm::omp::OMPC_reverse_offload;
1542:
OMPClause(
llvm::omp::OMPC_dynamic_allocators, StartLoc, EndLoc) {}
1565 return T->getClauseKind() == llvm::omp::OMPC_dynamic_allocators;
1617:
OMPClause(
llvm::omp::OMPC_atomic_default_mem_order, StartLoc, EndLoc),
1618LParenLoc(LParenLoc),
Kind(A), KindKwLoc(ALoc) {}
1655 return T->getClauseKind() == llvm::omp::OMPC_atomic_default_mem_order;
1689 voidsetLParenLoc(SourceLocation
Loc) { LParenLoc =
Loc; }
1702:
OMPClause(
llvm::omp::OMPC_at, StartLoc, EndLoc), LParenLoc(LParenLoc),
1703 Kind(A), KindKwLoc(ALoc) {}
1734 return T->getClauseKind() == llvm::omp::OMPC_at;
1765 voidsetSeverityKindKwLoc(
SourceLocationKLoc) { KindKwLoc = KLoc; }
1768 voidsetLParenLoc(SourceLocation
Loc) { LParenLoc =
Loc; }
1782LParenLoc(LParenLoc),
Kind(A), KindKwLoc(ALoc) {}
1814 return T->getClauseKind() == llvm::omp::OMPC_severity;
1832 Stmt*MessageString =
nullptr;
1835 voidsetMessageString(
Expr*MS) { MessageString = MS; }
1850LParenLoc(LParenLoc), MessageString(MS) {}
1864 return child_range(&MessageString, &MessageString + 1);
1880 return T->getClauseKind() == llvm::omp::OMPC_message;
1901 enum{FIRST, SECOND, NUM_MODIFIERS};
1914 Expr*ChunkSize =
nullptr;
1925Modifiers[FIRST] = M;
1932Modifiers[SECOND] = M;
1936 voidsetFirstScheduleModifierLoc(SourceLocation
Loc) {
1937ModifiersLoc[FIRST] =
Loc;
1941 voidsetSecondScheduleModifierLoc(SourceLocation
Loc) {
1942ModifiersLoc[SECOND] =
Loc;
1950Modifiers[FIRST] = M;
1953Modifiers[SECOND] = M;
1960 voidsetLParenLoc(SourceLocation
Loc) { LParenLoc =
Loc; }
1965 voidsetScheduleKindLoc(SourceLocation KLoc) { KindLoc = KLoc; }
1970 voidsetCommaLoc(SourceLocation
Loc) { CommaLoc =
Loc; }
1975 voidsetChunkSize(Expr *
E) { ChunkSize =
E; }
1996 Expr*ChunkSize,
Stmt*HelperChunkSize,
2001KindLoc(KLoc), CommaLoc(CommaLoc), ChunkSize(ChunkSize) {
2003Modifiers[FIRST] = M1;
2004Modifiers[SECOND] = M2;
2005ModifiersLoc[FIRST] = M1Loc;
2006ModifiersLoc[SECOND] = M2Loc;
2022 returnModifiers[FIRST];
2027 returnModifiers[SECOND];
2038 returnModifiersLoc[FIRST];
2043 returnModifiersLoc[SECOND];
2057 reinterpret_cast<Stmt**
>(&ChunkSize) + 1);
2073 return T->getClauseKind() == llvm::omp::OMPC_schedule;
2086 privatellvm::TrailingObjects<OMPOrderedClause, Expr *> {
2088 friendTrailingObjects;
2094 Stmt*NumForLoops =
nullptr;
2097 unsignedNumberOfLoops = 0;
2109LParenLoc(LParenLoc), NumForLoops(
Num), NumberOfLoops(NumLoops) {}
2114NumberOfLoops(NumLoops) {}
2117 voidsetNumForLoops(Expr *
Num) { NumForLoops =
Num; }
2127 staticOMPOrderedClause *
Create(
constASTContext &
C, Expr *
Num,
2128 unsignedNumLoops, SourceLocation StartLoc,
2129SourceLocation LParenLoc,
2130SourceLocation EndLoc);
2133 staticOMPOrderedClause*
CreateEmpty(
constASTContext &
C,
unsignedNumLoops);
2169 return T->getClauseKind() == llvm::omp::OMPC_ordered;
2225 return T->getClauseKind() == llvm::omp::OMPC_untied;
2243:
OMPClause(
llvm::omp::OMPC_mergeable, StartLoc, EndLoc) {}
2266 return T->getClauseKind() == llvm::omp::OMPC_mergeable;
2279 privatellvm::TrailingObjects<OMPAbsentClause, OpenMPDirectiveKind> {
2281 friendTrailingObjects;
2292llvm::omp::OMPC_absent, StartLoc, LParenLoc, EndLoc,
NumKinds) {}
2309 return C->getClauseKind() == llvm::omp::OMPC_absent;
2322 privatellvm::TrailingObjects<OMPContainsClause, OpenMPDirectiveKind> {
2324 friendTrailingObjects;
2335llvm::omp::OMPC_contains, StartLoc, LParenLoc, EndLoc,
NumKinds) {}
2352 return C->getClauseKind() == llvm::omp::OMPC_contains;
2483 return T->getClauseKind() == llvm::omp::OMPC_read;
2522 return T->getClauseKind() == llvm::omp::OMPC_write;
2543 privatellvm::TrailingObjects<OMPUpdateClause, SourceLocation,
2544OpenMPDependClauseKind> {
2546 friendTrailingObjects;
2549 boolIsExtended =
false;
2553 size_tnumTrailingObjects(OverloadToken<SourceLocation>)
const{
2555 returnIsExtended ? 2 : 0;
2560assert(IsExtended &&
"Expected extended clause.");
2561*getTrailingObjects<SourceLocation>() =
Loc;
2565 voidsetArgumentLoc(SourceLocation
Loc) {
2566assert(IsExtended &&
"Expected extended clause.");
2567*std::next(getTrailingObjects<SourceLocation>(), 1) =
Loc;
2572assert(IsExtended &&
"Expected extended clause.");
2573*getTrailingObjects<OpenMPDependClauseKind>() = DK;
2580OMPUpdateClause(SourceLocation StartLoc, SourceLocation EndLoc,
2583IsExtended(IsExtended) {}
2586OMPUpdateClause(
boolIsExtended)
2587:
OMPClause(
llvm::omp::OMPC_update, SourceLocation(), SourceLocation()),
2588IsExtended(IsExtended) {}
2596 staticOMPUpdateClause *
Create(
constASTContext &
C, SourceLocation StartLoc,
2597SourceLocation EndLoc);
2607 staticOMPUpdateClause *
Create(
constASTContext &
C, SourceLocation StartLoc,
2608SourceLocation LParenLoc,
2609SourceLocation ArgumentLoc,
2611SourceLocation EndLoc);
2618 staticOMPUpdateClause *
CreateEmpty(
constASTContext &
C,
boolIsExtended);
2640assert(IsExtended &&
"Expected extended clause.");
2641 return*getTrailingObjects<SourceLocation>();
2646assert(IsExtended &&
"Expected extended clause.");
2647 return*std::next(getTrailingObjects<SourceLocation>(), 1);
2652assert(IsExtended &&
"Expected extended clause.");
2653 return*getTrailingObjects<OpenMPDependClauseKind>();
2657 return T->getClauseKind() == llvm::omp::OMPC_update;
2675:
OMPClause(
llvm::omp::OMPC_capture, StartLoc, EndLoc) {}
2698 return T->getClauseKind() == llvm::omp::OMPC_capture;
2716:
OMPClause(
llvm::omp::OMPC_compare, StartLoc, EndLoc) {}
2739 return T->getClauseKind() == llvm::omp::OMPC_compare;
2757:
OMPClause(
llvm::omp::OMPC_seq_cst, StartLoc, EndLoc) {}
2780 return T->getClauseKind() == llvm::omp::OMPC_seq_cst;
2798:
OMPClause(
llvm::omp::OMPC_acq_rel, StartLoc, EndLoc) {}
2821 return T->getClauseKind() == llvm::omp::OMPC_acq_rel;
2839:
OMPClause(
llvm::omp::OMPC_acquire, StartLoc, EndLoc) {}
2862 return T->getClauseKind() == llvm::omp::OMPC_acquire;
2880:
OMPClause(
llvm::omp::OMPC_release, StartLoc, EndLoc) {}
2903 return T->getClauseKind() == llvm::omp::OMPC_release;
2921:
OMPClause(
llvm::omp::OMPC_relaxed, StartLoc, EndLoc) {}
2944 return T->getClauseKind() == llvm::omp::OMPC_relaxed;
2984 return T->getClauseKind() == llvm::omp::OMPC_weak;
3013this->FailParameter = FailParameter;
3015 "Invalid fail clause parameter");
3030FailParameterLoc(FailParameterLoc), LParenLoc(LParenLoc) {
3032setFailParameter(FailParameter);
3055 return T->getClauseKind() == llvm::omp::OMPC_fail;
3080 privatellvm::TrailingObjects<OMPPrivateClause, Expr *> {
3083 friendTrailingObjects;
3094LParenLoc, EndLoc, N) {}
3107 voidsetPrivateCopies(ArrayRef<Expr *> VL);
3111MutableArrayRef<Expr *> getPrivateCopies() {
3114ArrayRef<const Expr *> getPrivateCopies()
const{
3127 staticOMPPrivateClause *
Create(
constASTContext &
C, SourceLocation StartLoc,
3128SourceLocation LParenLoc,
3129SourceLocation EndLoc, ArrayRef<Expr *> VL,
3130ArrayRef<Expr *> PrivateVL);
3136 staticOMPPrivateClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
3142llvm::iterator_range<private_copies_const_iterator>;
3146getPrivateCopies().end());
3151getPrivateCopies().end());
3172 return T->getClauseKind() == llvm::omp::OMPC_private;
3187 privatellvm::TrailingObjects<OMPFirstprivateClause, Expr *> {
3190 friendTrailingObjects;
3201StartLoc, LParenLoc, EndLoc, N),
3216 voidsetPrivateCopies(ArrayRef<Expr *> VL);
3220MutableArrayRef<Expr *> getPrivateCopies() {
3223ArrayRef<const Expr *> getPrivateCopies()
const{
3230 voidsetInits(ArrayRef<Expr *> VL);
3234MutableArrayRef<Expr *> getInits() {
3235 returnMutableArrayRef<Expr *>(getPrivateCopies().end(),
varlist_size());
3237ArrayRef<const Expr *> getInits()
const{
3255 staticOMPFirstprivateClause *
3256 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
3257SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> PrivateVL,
3258ArrayRef<Expr *> InitVL, Stmt *PreInit);
3264 staticOMPFirstprivateClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
3270llvm::iterator_range<private_copies_const_iterator>;
3274getPrivateCopies().end());
3278getPrivateCopies().end());
3287 return inits_range(getInits().begin(), getInits().end());
3313 return T->getClauseKind() == llvm::omp::OMPC_firstprivate;
3328 privatellvm::TrailingObjects<OMPLastprivateClause, Expr *> {
3347 friendTrailingObjects;
3367StartLoc, LParenLoc, EndLoc, N),
3369ColonLoc(ColonLoc) {}
3382MutableArrayRef<Expr *> getPrivateCopies() {
3385ArrayRef<const Expr *> getPrivateCopies()
const{
3393 voidsetSourceExprs(ArrayRef<Expr *> SrcExprs);
3396MutableArrayRef<Expr *> getSourceExprs() {
3397 returnMutableArrayRef<Expr *>(getPrivateCopies().end(),
varlist_size());
3399ArrayRef<const Expr *> getSourceExprs()
const{
3407 voidsetDestinationExprs(ArrayRef<Expr *> DstExprs);
3410MutableArrayRef<Expr *> getDestinationExprs() {
3411 returnMutableArrayRef<Expr *>(getSourceExprs().end(),
varlist_size());
3413ArrayRef<const Expr *> getDestinationExprs()
const{
3420 voidsetAssignmentOps(ArrayRef<Expr *> AssignmentOps);
3423MutableArrayRef<Expr *> getAssignmentOps() {
3424 returnMutableArrayRef<Expr *>(getDestinationExprs().end(),
varlist_size());
3426ArrayRef<const Expr *> getAssignmentOps()
const{
3433 voidsetKindLoc(SourceLocation
Loc) { LPKindLoc =
Loc; }
3435 voidsetColonLoc(SourceLocation
Loc) { ColonLoc =
Loc; }
3465 staticOMPLastprivateClause *
3466 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
3467SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> SrcExprs,
3468ArrayRef<Expr *> DstExprs, ArrayRef<Expr *> AssignmentOps,
3470SourceLocation ColonLoc, Stmt *PreInit, Expr *PostUpdate);
3476 staticOMPLastprivateClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
3489llvm::iterator_range<helper_expr_const_iterator>;
3497getPrivateCopies().end());
3502getPrivateCopies().end());
3507getSourceExprs().end());
3516getDestinationExprs().end());
3521getDestinationExprs().end());
3526getAssignmentOps().end());
3531getAssignmentOps().end());
3552 return T->getClauseKind() == llvm::omp::OMPC_lastprivate;
3565 privatellvm::TrailingObjects<OMPSharedClause, Expr *> {
3567 friendTrailingObjects;
3578LParenLoc, EndLoc, N) {}
3624 return T->getClauseKind() == llvm::omp::OMPC_shared;
3639 privatellvm::TrailingObjects<OMPReductionClause, Expr *> {
3642 friendTrailingObjects;
3676StartLoc, LParenLoc, EndLoc, N),
3678ModifierLoc(ModifierLoc), ColonLoc(ColonLoc),
3679QualifierLoc(QualifierLoc), NameInfo(NameInfo) {}
3694 voidsetModifierLoc(SourceLocation
Loc) { ModifierLoc =
Loc; }
3697 voidsetColonLoc(SourceLocation CL) { ColonLoc = CL; }
3700 voidsetNameInfo(DeclarationNameInfo DNI) { NameInfo = DNI; }
3703 voidsetQualifierLoc(NestedNameSpecifierLoc NSL) { QualifierLoc = NSL; }
3708 voidsetPrivates(ArrayRef<Expr *> Privates);
3711MutableArrayRef<Expr *> getPrivates() {
3714ArrayRef<const Expr *> getPrivates()
const{
3721 voidsetLHSExprs(ArrayRef<Expr *> LHSExprs);
3724MutableArrayRef<Expr *> getLHSExprs() {
3725 returnMutableArrayRef<Expr *>(getPrivates().end(),
varlist_size());
3727ArrayRef<const Expr *> getLHSExprs()
const{
3736 voidsetRHSExprs(ArrayRef<Expr *> RHSExprs);
3739MutableArrayRef<Expr *> getRHSExprs() {
3740 returnMutableArrayRef<Expr *>(getLHSExprs().end(),
varlist_size());
3742ArrayRef<const Expr *> getRHSExprs()
const{
3750 voidsetReductionOps(ArrayRef<Expr *> ReductionOps);
3753MutableArrayRef<Expr *> getReductionOps() {
3754 returnMutableArrayRef<Expr *>(getRHSExprs().end(),
varlist_size());
3756ArrayRef<const Expr *> getReductionOps()
const{
3762 voidsetInscanCopyOps(ArrayRef<Expr *> Ops);
3765MutableArrayRef<Expr *> getInscanCopyOps() {
3766 returnMutableArrayRef<Expr *>(getReductionOps().end(),
varlist_size());
3768ArrayRef<const Expr *> getInscanCopyOps()
const{
3773 voidsetInscanCopyArrayTemps(ArrayRef<Expr *> CopyArrayTemps);
3776MutableArrayRef<Expr *> getInscanCopyArrayTemps() {
3777 returnMutableArrayRef<Expr *>(getInscanCopyOps().end(),
varlist_size());
3779ArrayRef<const Expr *> getInscanCopyArrayTemps()
const{
3784 voidsetInscanCopyArrayElems(ArrayRef<Expr *> CopyArrayElems);
3787MutableArrayRef<Expr *> getInscanCopyArrayElems() {
3788 returnMutableArrayRef<Expr *>(getInscanCopyArrayTemps().end(),
3791ArrayRef<const Expr *> getInscanCopyArrayElems()
const{
3835 staticOMPReductionClause *
3836 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
3837SourceLocation ModifierLoc, SourceLocation ColonLoc,
3839ArrayRef<Expr *> VL, NestedNameSpecifierLoc QualifierLoc,
3840 constDeclarationNameInfo &NameInfo, ArrayRef<Expr *> Privates,
3841ArrayRef<Expr *> LHSExprs, ArrayRef<Expr *> RHSExprs,
3842ArrayRef<Expr *> ReductionOps, ArrayRef<Expr *> CopyOps,
3843ArrayRef<Expr *> CopyArrayTemps, ArrayRef<Expr *> CopyArrayElems,
3844Stmt *PreInit, Expr *PostUpdate);
3851 staticOMPReductionClause *
3874llvm::iterator_range<helper_expr_const_iterator>;
3902getReductionOps().end());
3907getReductionOps().end());
3912getInscanCopyOps().end());
3917getInscanCopyOps().end());
3922getInscanCopyArrayTemps().end());
3927getInscanCopyArrayTemps().end());
3932getInscanCopyArrayElems().end());
3937getInscanCopyArrayElems().end());
3960 return T->getClauseKind() == llvm::omp::OMPC_reduction;
3975 privatellvm::TrailingObjects<OMPTaskReductionClause, Expr *> {
3978 friendTrailingObjects;
4003 llvm::omp::OMPC_task_reduction, StartLoc, LParenLoc, EndLoc, N),
4005QualifierLoc(QualifierLoc), NameInfo(NameInfo) {}
4017 voidsetColonLoc(SourceLocation CL) { ColonLoc = CL; }
4020 voidsetNameInfo(DeclarationNameInfo DNI) { NameInfo = DNI; }
4023 voidsetQualifierLoc(NestedNameSpecifierLoc NSL) { QualifierLoc = NSL; }
4027 voidsetPrivates(ArrayRef<Expr *> Privates);
4030MutableArrayRef<Expr *> getPrivates() {
4033ArrayRef<const Expr *> getPrivates()
const{
4040 voidsetLHSExprs(ArrayRef<Expr *> LHSExprs);
4043MutableArrayRef<Expr *> getLHSExprs() {
4044 returnMutableArrayRef<Expr *>(getPrivates().end(),
varlist_size());
4046ArrayRef<const Expr *> getLHSExprs()
const{
4054 voidsetRHSExprs(ArrayRef<Expr *> RHSExprs);
4057MutableArrayRef<Expr *> getRHSExprs() {
4058 returnMutableArrayRef<Expr *>(getLHSExprs().end(),
varlist_size());
4060ArrayRef<const Expr *> getRHSExprs()
const{
4068 voidsetReductionOps(ArrayRef<Expr *> ReductionOps);
4071MutableArrayRef<Expr *> getReductionOps() {
4072 returnMutableArrayRef<Expr *>(getRHSExprs().end(),
varlist_size());
4074ArrayRef<const Expr *> getReductionOps()
const{
4111 staticOMPTaskReductionClause *
4112 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
4113SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef<Expr *> VL,
4114NestedNameSpecifierLoc QualifierLoc,
4115 constDeclarationNameInfo &NameInfo, ArrayRef<Expr *> Privates,
4116ArrayRef<Expr *> LHSExprs, ArrayRef<Expr *> RHSExprs,
4117ArrayRef<Expr *> ReductionOps, Stmt *PreInit, Expr *PostUpdate);
4123 staticOMPTaskReductionClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
4138llvm::iterator_range<helper_expr_const_iterator>;
4166getReductionOps().end());
4171getReductionOps().end());
4192 return T->getClauseKind() == llvm::omp::OMPC_task_reduction;
4206 privatellvm::TrailingObjects<OMPInReductionClause, Expr *> {
4209 friendTrailingObjects;
4234StartLoc, LParenLoc, EndLoc, N),
4236QualifierLoc(QualifierLoc), NameInfo(NameInfo) {}
4248 voidsetColonLoc(SourceLocation CL) { ColonLoc = CL; }
4251 voidsetNameInfo(DeclarationNameInfo DNI) { NameInfo = DNI; }
4254 voidsetQualifierLoc(NestedNameSpecifierLoc NSL) { QualifierLoc = NSL; }
4258 voidsetPrivates(ArrayRef<Expr *> Privates);
4261MutableArrayRef<Expr *> getPrivates() {
4264ArrayRef<const Expr *> getPrivates()
const{
4271 voidsetLHSExprs(ArrayRef<Expr *> LHSExprs);
4274MutableArrayRef<Expr *> getLHSExprs() {
4275 returnMutableArrayRef<Expr *>(getPrivates().end(),
varlist_size());
4277ArrayRef<const Expr *> getLHSExprs()
const{
4285 voidsetRHSExprs(ArrayRef<Expr *> RHSExprs);
4288MutableArrayRef<Expr *> getRHSExprs() {
4289 returnMutableArrayRef<Expr *>(getLHSExprs().end(),
varlist_size());
4291ArrayRef<const Expr *> getRHSExprs()
const{
4299 voidsetReductionOps(ArrayRef<Expr *> ReductionOps);
4302MutableArrayRef<Expr *> getReductionOps() {
4303 returnMutableArrayRef<Expr *>(getRHSExprs().end(),
varlist_size());
4305ArrayRef<const Expr *> getReductionOps()
const{
4310 voidsetTaskgroupDescriptors(ArrayRef<Expr *> ReductionOps);
4313MutableArrayRef<Expr *> getTaskgroupDescriptors() {
4314 returnMutableArrayRef<Expr *>(getReductionOps().end(),
varlist_size());
4316ArrayRef<const Expr *> getTaskgroupDescriptors()
const{
4355 staticOMPInReductionClause *
4356 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
4357SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef<Expr *> VL,
4358NestedNameSpecifierLoc QualifierLoc,
4359 constDeclarationNameInfo &NameInfo, ArrayRef<Expr *> Privates,
4360ArrayRef<Expr *> LHSExprs, ArrayRef<Expr *> RHSExprs,
4361ArrayRef<Expr *> ReductionOps, ArrayRef<Expr *> TaskgroupDescriptors,
4362Stmt *PreInit, Expr *PostUpdate);
4368 staticOMPInReductionClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
4383llvm::iterator_range<helper_expr_const_iterator>;
4411getReductionOps().end());
4416getReductionOps().end());
4421getTaskgroupDescriptors().end());
4426getTaskgroupDescriptors().end());
4447 return T->getClauseKind() == llvm::omp::OMPC_in_reduction;
4462 privatellvm::TrailingObjects<OMPLinearClause, Expr *> {
4465 friendTrailingObjects;
4480 voidsetStep(
Expr*Step) { *(getFinals().end()) = Step; }
4483 voidsetCalcStep(
Expr*CalcStep) { *(getFinals().end() + 1) = CalcStep; }
4493OMPLinearClause(SourceLocation StartLoc, SourceLocation LParenLoc,
4495SourceLocation ColonLoc, SourceLocation StepModifierLoc,
4496SourceLocation EndLoc,
unsignedNumVars)
4497: OMPVarListClause<OMPLinearClause>(
llvm::omp::OMPC_linear, StartLoc,
4498LParenLoc, EndLoc, NumVars),
4499OMPClauseWithPostUpdate(this), Modifier(Modifier),
4500ModifierLoc(ModifierLoc), ColonLoc(ColonLoc),
4501StepModifierLoc(StepModifierLoc) {}
4506 explicitOMPLinearClause(
unsignedNumVars)
4507: OMPVarListClause<OMPLinearClause>(
llvm::omp::OMPC_linear,
4508SourceLocation(), SourceLocation(),
4509SourceLocation(), NumVars),
4524MutableArrayRef<Expr *> getPrivates() {
4527ArrayRef<const Expr *> getPrivates()
const{
4531MutableArrayRef<Expr *> getInits() {
4532 returnMutableArrayRef<Expr *>(getPrivates().end(),
varlist_size());
4534ArrayRef<const Expr *> getInits()
const{
4539MutableArrayRef<Expr *> getUpdates() {
4540 returnMutableArrayRef<Expr *>(getInits().end(),
varlist_size());
4542ArrayRef<const Expr *> getUpdates()
const{
4547MutableArrayRef<Expr *> getFinals() {
4548 returnMutableArrayRef<Expr *>(getUpdates().end(),
varlist_size());
4550ArrayRef<const Expr *> getFinals()
const{
4555MutableArrayRef<Expr *> getUsedExprs() {
4556 returnMutableArrayRef<Expr *>(getFinals().end() + 2,
varlist_size() + 1);
4558ArrayRef<const Expr *> getUsedExprs()
const{
4564 voidsetPrivates(ArrayRef<Expr *> PL);
4568 voidsetInits(ArrayRef<Expr *> IL);
4591 staticOMPLinearClause *
4592 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
4594SourceLocation ColonLoc, SourceLocation StepModifierLoc,
4595SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> PL,
4596ArrayRef<Expr *> IL, Expr *Step, Expr *CalcStep, Stmt *PreInit,
4603 staticOMPLinearClause *
CreateEmpty(
constASTContext &
C,
unsignedNumVars);
4658 return privates_range(getPrivates().begin(), getPrivates().end());
4671 return inits_range(getInits().begin(), getInits().end());
4684 return updates_range(getUpdates().begin(), getUpdates().end());
4697 return finals_range(getFinals().begin(), getFinals().end());
4707llvm::iterator_range<used_expressions_iterator>;
4709llvm::iterator_range<used_expressions_const_iterator>;
4712 return finals_range(getUsedExprs().begin(), getUsedExprs().end());
4737 return T->getClauseKind() == llvm::omp::OMPC_linear;
4751 privatellvm::TrailingObjects<OMPAlignedClause, Expr *> {
4754 friendTrailingObjects;
4773LParenLoc, EndLoc, NumVars),
4774ColonLoc(ColonLoc) {}
4779 explicitOMPAlignedClause(
unsignedNumVars)
4780: OMPVarListClause<OMPAlignedClause>(
llvm::omp::OMPC_aligned,
4781SourceLocation(), SourceLocation(),
4782SourceLocation(), NumVars) {}
4794 staticOMPAlignedClause *
Create(
constASTContext &
C, SourceLocation StartLoc,
4795SourceLocation LParenLoc,
4796SourceLocation ColonLoc,
4797SourceLocation EndLoc, ArrayRef<Expr *> VL,
4804 staticOMPAlignedClause *
CreateEmpty(
constASTContext &
C,
unsignedNumVars);
4836 return T->getClauseKind() == llvm::omp::OMPC_aligned;
4849 privatellvm::TrailingObjects<OMPCopyinClause, Expr *> {
4865 friendTrailingObjects;
4876LParenLoc, EndLoc, N) {}
4889 voidsetSourceExprs(ArrayRef<Expr *> SrcExprs);
4892MutableArrayRef<Expr *> getSourceExprs() {
4895ArrayRef<const Expr *> getSourceExprs()
const{
4902 voidsetDestinationExprs(ArrayRef<Expr *> DstExprs);
4905MutableArrayRef<Expr *> getDestinationExprs() {
4906 returnMutableArrayRef<Expr *>(getSourceExprs().end(),
varlist_size());
4908ArrayRef<const Expr *> getDestinationExprs()
const{
4916 voidsetAssignmentOps(ArrayRef<Expr *> AssignmentOps);
4919MutableArrayRef<Expr *> getAssignmentOps() {
4920 returnMutableArrayRef<Expr *>(getDestinationExprs().end(),
varlist_size());
4922ArrayRef<const Expr *> getAssignmentOps()
const{
4948 staticOMPCopyinClause *
4949 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
4950SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> SrcExprs,
4951ArrayRef<Expr *> DstExprs, ArrayRef<Expr *> AssignmentOps);
4957 staticOMPCopyinClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
4963llvm::iterator_range<helper_expr_const_iterator>;
4967getSourceExprs().end());
4976getDestinationExprs().end());
4981getDestinationExprs().end());
4986getAssignmentOps().end());
4991getAssignmentOps().end());
5012 return T->getClauseKind() == llvm::omp::OMPC_copyin;
5026 privatellvm::TrailingObjects<OMPCopyprivateClause, Expr *> {
5029 friendTrailingObjects;
5040StartLoc, LParenLoc, EndLoc, N) {
5054 voidsetSourceExprs(ArrayRef<Expr *> SrcExprs);
5057MutableArrayRef<Expr *> getSourceExprs() {
5060ArrayRef<const Expr *> getSourceExprs()
const{
5067 voidsetDestinationExprs(ArrayRef<Expr *> DstExprs);
5070MutableArrayRef<Expr *> getDestinationExprs() {
5071 returnMutableArrayRef<Expr *>(getSourceExprs().end(),
varlist_size());
5073ArrayRef<const Expr *> getDestinationExprs()
const{
5081 voidsetAssignmentOps(ArrayRef<Expr *> AssignmentOps);
5084MutableArrayRef<Expr *> getAssignmentOps() {
5085 returnMutableArrayRef<Expr *>(getDestinationExprs().end(),
varlist_size());
5087ArrayRef<const Expr *> getAssignmentOps()
const{
5112 staticOMPCopyprivateClause *
5113 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
5114SourceLocation EndLoc, ArrayRef<Expr *> VL, ArrayRef<Expr *> SrcExprs,
5115ArrayRef<Expr *> DstExprs, ArrayRef<Expr *> AssignmentOps);
5121 staticOMPCopyprivateClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
5127llvm::iterator_range<helper_expr_const_iterator>;
5131getSourceExprs().end());
5140getDestinationExprs().end());
5145getDestinationExprs().end());
5150getAssignmentOps().end());
5155getAssignmentOps().end());
5176 return T->getClauseKind() == llvm::omp::OMPC_copyprivate;
5194 privatellvm::TrailingObjects<OMPFlushClause, Expr *> {
5196 friendTrailingObjects;
5207LParenLoc, EndLoc, N) {}
5253 return T->getClauseKind() == llvm::omp::OMPC_flush;
5276 Expr*Depobj =
nullptr;
5286LParenLoc(LParenLoc) {}
5293 voidsetDepobj(Expr *
E) { Depobj =
E; }
5296 voidsetLParenLoc(SourceLocation
Loc) { LParenLoc =
Loc; }
5306 staticOMPDepobjClause *
Create(
constASTContext &
C, SourceLocation StartLoc,
5307SourceLocation LParenLoc,
5308SourceLocation EndLoc, Expr *Depobj);
5313 staticOMPDepobjClause *
CreateEmpty(
constASTContext &
C);
5324 reinterpret_cast<Stmt**
>(&Depobj) + 1);
5340 return T->getClauseKind() == llvm::omp::OMPC_depobj;
5354 privatellvm::TrailingObjects<OMPDependClause, Expr *> {
5357 friendTrailingObjects;
5379 unsignedNumLoops = 0;
5392LParenLoc, EndLoc, N),
5393NumLoops(NumLoops) {}
5404NumLoops(NumLoops) {}
5410 voidsetDependencyLoc(SourceLocation
Loc) {
Data.DepLoc =
Loc; }
5413 voidsetColonLoc(SourceLocation
Loc) {
Data.ColonLoc =
Loc; }
5416 voidsetOmpAllMemoryLoc(SourceLocation
Loc) {
Data.OmpAllMemoryLoc =
Loc; }
5419 voidsetModifier(Expr *DepModifier);
5432 staticOMPDependClause *
Create(
constASTContext &
C, SourceLocation StartLoc,
5433SourceLocation LParenLoc,
5434SourceLocation EndLoc, DependDataTy Data,
5435Expr *DepModifier, ArrayRef<Expr *> VL,
5444 staticOMPDependClause *
CreateEmpty(
constASTContext &
C,
unsignedN,
5494 return T->getClauseKind() == llvm::omp::OMPC_depend;
5519 Stmt*Device =
nullptr;
5530 voidsetModifierLoc(SourceLocation
Loc) { ModifierLoc =
Loc; }
5549ModifierLoc(ModifierLoc),
Device(
E) {
5590 return T->getClauseKind() == llvm::omp::OMPC_device;
5649 return T->getClauseKind() == llvm::omp::OMPC_simd;
5666llvm::PointerIntPair<Expr *, 1, bool> AssociatedExpressionNonContiguousPr;
5671 ValueDecl*AssociatedDeclaration =
nullptr;
5677 boolIsNonContiguous)
5678: AssociatedExpressionNonContiguousPr(AssociatedExpression,
5680AssociatedDeclaration(
5681AssociatedDeclaration
5686 returnAssociatedExpressionNonContiguousPr.getPointer();
5690 returnAssociatedExpressionNonContiguousPr.getInt();
5694 returnAssociatedDeclaration;
5748 unsignedNumUniqueDeclarations;
5751 unsignedNumComponentLists;
5754 unsignedNumComponents;
5759 const boolSupportsMapper;
5793NumUniqueDeclarations(Sizes.NumUniqueDeclarations),
5794NumComponentLists(Sizes.NumComponentLists),
5795NumComponents(Sizes.NumComponents), SupportsMapper(SupportsMapper) {
5796 if(MapperQualifierLocPtr)
5797MapperQualifierLoc = *MapperQualifierLocPtr;
5798 if(MapperIdInfoPtr)
5799MapperIdInfo = *MapperIdInfoPtr;
5806 static_cast<T*
>(
this)->
templategetTrailingObjects<ValueDecl *>(),
5807NumUniqueDeclarations);
5814 static_cast<const T*
>(
this)
5815->
templategetTrailingObjects<ValueDecl *>(),
5816NumUniqueDeclarations);
5822assert(UDs.size() == NumUniqueDeclarations &&
5823 "Unexpected amount of unique declarations.");
5831 static_cast<T*
>(
this)->
templategetTrailingObjects<unsigned>(),
5832NumUniqueDeclarations);
5839 static_cast<const T*
>(
this)->
templategetTrailingObjects<unsigned>(),
5840NumUniqueDeclarations);
5846assert(DNLs.size() == NumUniqueDeclarations &&
5847 "Unexpected amount of list numbers.");
5855 static_cast<T*
>(
this)->
templategetTrailingObjects<unsigned>() +
5856NumUniqueDeclarations,
5864 static_cast<const T*
>(
this)->
templategetTrailingObjects<unsigned>() +
5865NumUniqueDeclarations,
5872assert(CLSs.size() == NumComponentLists &&
5873 "Unexpected amount of component lists.");
5880 static_cast<T*
>(
this)
5881->
templategetTrailingObjects<MappableComponent>(),
5888 static_cast<const T*
>(
this)
5889->
templategetTrailingObjects<MappableComponent>(),
5898assert(Components.size() == NumComponents &&
5899 "Unexpected amount of component lists.");
5900assert(CLSs.size() == NumComponentLists &&
5901 "Unexpected amount of list sizes.");
5902std::copy(Components.begin(), Components.end(),
getComponentsRef().begin());
5912NumUniqueDeclarations &&
5913 "Unexpected number of mappable expression info entries!");
5915 "Unexpected total number of components!");
5916assert(Declarations.size() == ComponentLists.size() &&
5917 "Declaration and component lists size is not consistent!");
5918assert(Declarations.size() == NumComponentLists &&
5919 "Unexpected declaration and component lists size!");
5924llvm::MapVector<ValueDecl *, SmallVector<MappableExprComponentListRef, 8>>
5927 autoCI = ComponentLists.begin();
5928 for(
autoDI = Declarations.begin(), DE = Declarations.end(); DI != DE;
5930assert(!CI->empty() &&
"Invalid component list!");
5931ComponentListMap[*DI].push_back(*CI);
5937 autoUDI = UniqueDeclarations.begin();
5940 autoDNLI = DeclNumLists.begin();
5943 autoCLSI = ComponentListSizes.begin();
5946 autoCI = Components.begin();
5949 unsignedPrevSize = 0u;
5952 for(
auto&M : ComponentListMap) {
5967 for(
auto C: CL) {
5969PrevSize +=
C.size();
5976CI = std::copy(
C.begin(),
C.end(), CI);
5983MapperQualifierLoc = NNSL;
5988MapperIdInfo = MapperId;
5994assert(SupportsMapper &&
5995 "Must be a clause that is possible to have user-defined mappers");
5997 static_cast<T*
>(
this)->
templategetTrailingObjects<Expr *>() +
6005assert(SupportsMapper &&
6006 "Must be a clause that is possible to have user-defined mappers");
6008 static_cast<const T*
>(
this)->
templategetTrailingObjects<Expr *>() +
6017 "Unexpected number of user-defined mappers.");
6018assert(SupportsMapper &&
6019 "Must be a clause that is possible to have user-defined mappers");
6036 returnMapperQualifierLoc;
6045:
publicllvm::iterator_adaptor_base<
6046const_component_lists_iterator,
6047MappableExprComponentListRef::const_iterator,
6048std::forward_iterator_tag, MappableComponent, ptrdiff_t,
6049MappableComponent, MappableComponent> {
6057 const boolSupportsMapper;
6063 unsignedRemainingLists = 0;
6067 unsignedPrevListSize = 0;
6075MappableExprComponentListRef::const_iterator End;
6085Components.begin()),
6086DeclCur(UniqueDecls.begin()), NumListsCur(DeclsListNum.begin()),
6087SupportsMapper(SupportsMapper),
6088ListSizeCur(CumulativeListSizes.begin()),
6089ListSizeEnd(CumulativeListSizes.end()), End(Components.end()) {
6090assert(UniqueDecls.size() == DeclsListNum.size() &&
6091 "Inconsistent number of declarations and list sizes!");
6092 if(!DeclsListNum.empty())
6093RemainingLists = *NumListsCur;
6095MapperCur = Mappers.begin();
6106CumulativeListSizes, Components,
6107SupportsMapper, Mappers) {
6111 for(; DeclCur != UniqueDecls.end(); ++DeclCur, ++NumListsCur) {
6115assert(*NumListsCur > 0 &&
"No lists associated with declaration??");
6119std::advance(ListSizeCur, *NumListsCur - 1);
6120PrevListSize = *ListSizeCur;
6129 if(ListSizeCur == CumulativeListSizes.end()) {
6131RemainingLists = 0u;
6137RemainingLists = *NumListsCur;
6140ListSizeEnd = ListSizeCur;
6141std::advance(ListSizeEnd, RemainingLists);
6145std::advance(this->I, PrevListSize);
6153assert(ListSizeCur != ListSizeEnd &&
"Invalid iterator!");
6155 if(SupportsMapper && *MapperCur)
6156Mapper = cast<ValueDecl>(cast<DeclRefExpr>(*MapperCur)->getDecl());
6157 returnstd::make_tuple(
6170assert(ListSizeCur != ListSizeEnd && RemainingLists &&
6171 "Invalid iterator!");
6175 if(std::next(ListSizeCur) == ListSizeEnd) {
6179std::advance(this->I, *ListSizeCur - PrevListSize);
6180PrevListSize = *ListSizeCur;
6183 if(!(--RemainingLists)) {
6186RemainingLists = *NumListsCur;
6187assert(RemainingLists &&
"No lists in the following declaration??");
6199llvm::iterator_range<const_component_lists_iterator>;
6213SupportsMapper, {});
6221const_component_lists_iterator
6247llvm::iterator_range<const_all_num_lists_iterator>;
6256llvm::iterator_range<const_all_lists_sizes_iterator>;
6265llvm::iterator_range<const_all_components_iterator>;
6276llvm::iterator_range<mapperlist_const_iterator>;
6303 privatellvm::TrailingObjects<
6304OMPMapClause, Expr *, ValueDecl *, unsigned,
6305OMPClauseMappableExprCommon::MappableComponent> {
6309 friendTrailingObjects;
6313 size_tnumTrailingObjects(OverloadToken<Expr *>)
const{
6318 size_tnumTrailingObjects(OverloadToken<ValueDecl *>)
const{
6321 size_tnumTrailingObjects(OverloadToken<unsigned>)
const{
6339 boolMapTypeIsImplicit =
false;
6342SourceLocation MapLoc;
6345SourceLocation ColonLoc;
6367 explicitOMPMapClause(ArrayRef<OpenMPMapModifierKind> MapModifiers,
6368ArrayRef<SourceLocation> MapModifiersLoc,
6369NestedNameSpecifierLoc MapperQualifierLoc,
6370DeclarationNameInfo MapperIdInfo,
6372SourceLocation MapLoc,
constOMPVarListLocTy &Locs,
6373 constOMPMappableExprListSizeTy &Sizes)
6374: OMPMappableExprListClause(
llvm::omp::OMPC_map, Locs, Sizes,
6375 true, &MapperQualifierLoc,
6377MapType(MapType), MapTypeIsImplicit(MapTypeIsImplicit), MapLoc(MapLoc) {
6378assert(std::size(MapTypeModifiers) == MapModifiers.size() &&
6379 "Unexpected number of map type modifiers.");
6380llvm::copy(MapModifiers, std::begin(MapTypeModifiers));
6382assert(std::size(MapTypeModifiersLoc) == MapModifiersLoc.size() &&
6383 "Unexpected number of map type modifier locations.");
6384llvm::copy(MapModifiersLoc, std::begin(MapTypeModifiersLoc));
6394 explicitOMPMapClause(
constOMPMappableExprListSizeTy &Sizes)
6395: OMPMappableExprListClause(
llvm::omp::OMPC_map, OMPVarListLocTy(), Sizes,
6404 "Unexpected index to store map type modifier, exceeds array size.");
6405MapTypeModifiers[I] =
T;
6412 voidsetMapTypeModifierLoc(
unsignedI, SourceLocation TLoc) {
6414 "Index to store map type modifier location exceeds array size.");
6415MapTypeModifiersLoc[I] = TLoc;
6426 voidsetMapLoc(SourceLocation TLoc) { MapLoc = TLoc; }
6429 voidsetColonLoc(SourceLocation
Loc) { ColonLoc =
Loc; }
6432 voidsetIteratorModifier(Expr *IteratorModifier) {
6433getTrailingObjects<Expr *>()[2 *
varlist_size()] = IteratorModifier;
6457 staticOMPMapClause *
6458 Create(
constASTContext &
C,
constOMPVarListLocTy &Locs,
6459ArrayRef<Expr *> Vars, ArrayRef<ValueDecl *> Declarations,
6461ArrayRef<Expr *> UDMapperRefs, Expr *IteratorModifier,
6462ArrayRef<OpenMPMapModifierKind> MapModifiers,
6463ArrayRef<SourceLocation> MapModifiersLoc,
6464NestedNameSpecifierLoc UDMQualifierLoc, DeclarationNameInfo MapperId,
6477 staticOMPMapClause *
CreateEmpty(
constASTContext &
C,
6478 constOMPMappableExprListSizeTy &Sizes);
6482 returngetTrailingObjects<Expr *>()[2 *
varlist_size()];
6500 "Requested modifier exceeds the total number of modifiers.");
6501 returnMapTypeModifiers[Cnt];
6510 "Requested modifier location exceeds total number of modifiers.");
6511 returnMapTypeModifiersLoc[Cnt];
6542 if(MapType == OMPC_MAP_to || MapType == OMPC_MAP_tofrom)
6554 return T->getClauseKind() == llvm::omp::OMPC_map;
6576 privatellvm::TrailingObjects<OMPNumTeamsClause, Expr *> {
6578 friendTrailingObjects;
6585:
OMPVarListClause(llvm::omp::OMPC_num_teams, StartLoc, LParenLoc, EndLoc,
6647 return T->getClauseKind() == llvm::omp::OMPC_num_teams;
6669 privatellvm::TrailingObjects<OMPThreadLimitClause, Expr *> {
6671 friendTrailingObjects;
6741 return T->getClauseKind() == llvm::omp::OMPC_thread_limit;
6815 return T->getClauseKind() == llvm::omp::OMPC_priority;
6840 Stmt*Grainsize =
nullptr;
6843 voidsetGrainsize(
Expr*Size) { Grainsize = Size; }
6849 voidsetModifierLoc(SourceLocation
Loc) { ModifierLoc =
Loc; }
6867:
OMPClause(
llvm::omp::OMPC_grainsize, StartLoc, EndLoc),
6869ModifierLoc(ModifierLoc), Grainsize(Size) {
6907 return T->getClauseKind() == llvm::omp::OMPC_grainsize;
6924:
OMPClause(
llvm::omp::OMPC_nogroup, StartLoc, EndLoc) {}
6947 return T->getClauseKind() == llvm::omp::OMPC_nogroup;
6972 Stmt*NumTasks =
nullptr;
6975 voidsetNumTasks(
Expr*Size) { NumTasks = Size; }
6981 voidsetModifierLoc(SourceLocation
Loc) { ModifierLoc =
Loc; }
6999:
OMPClause(
llvm::omp::OMPC_num_tasks, StartLoc, EndLoc),
7001ModifierLoc(ModifierLoc), NumTasks(Size) {
7039 return T->getClauseKind() == llvm::omp::OMPC_num_tasks;
7057 Stmt*Hint =
nullptr;
7060 voidsetHint(
Expr*H) { Hint = H; }
7071:
OMPClause(
llvm::omp::OMPC_hint, StartLoc, EndLoc), LParenLoc(LParenLoc),
7101 return T->getClauseKind() == llvm::omp::OMPC_hint;
7129 Expr*ChunkSize =
nullptr;
7144 voidsetDistScheduleKindLoc(SourceLocation KLoc) { KindLoc = KLoc; }
7149 voidsetCommaLoc(SourceLocation
Loc) { CommaLoc =
Loc; }
7154 voidsetChunkSize(Expr *
E) { ChunkSize =
E; }
7172 Stmt*HelperChunkSize)
7173:
OMPClause(
llvm::omp::OMPC_dist_schedule, StartLoc, EndLoc),
7175KindLoc(KLoc), CommaLoc(CommaLoc), ChunkSize(ChunkSize) {
7205 reinterpret_cast<Stmt**
>(&ChunkSize) + 1);
7221 return T->getClauseKind() == llvm::omp::OMPC_dist_schedule;
7263 voidsetDefaultmapModifierLoc(SourceLocation
Loc) {
7270 voidsetLParenLoc(SourceLocation
Loc) { LParenLoc =
Loc; }
7275 voidsetDefaultmapKindLoc(SourceLocation KLoc) { KindLoc = KLoc; }
7291:
OMPClause(
llvm::omp::OMPC_defaultmap, StartLoc, EndLoc),
7292LParenLoc(LParenLoc), Modifier(M), ModifierLoc(MLoc),
Kind(
Kind),
7335 return T->getClauseKind() == llvm::omp::OMPC_defaultmap;
7348 privatellvm::TrailingObjects<
7349OMPToClause, Expr *, ValueDecl *, unsigned,
7350OMPClauseMappableExprCommon::MappableComponent> {
7354 friendTrailingObjects;
7388 true, &MapperQualifierLoc,
7390assert(std::size(MotionModifiers) == TheMotionModifiers.size() &&
7391 "Unexpected number of motion modifiers.");
7392llvm::copy(TheMotionModifiers, std::begin(MotionModifiers));
7394assert(std::size(MotionModifiersLoc) == TheMotionModifiersLoc.size() &&
7395 "Unexpected number of motion modifier locations.");
7396llvm::copy(TheMotionModifiersLoc, std::begin(MotionModifiersLoc));
7406 explicitOMPToClause(
constOMPMappableExprListSizeTy &Sizes)
7407: OMPMappableExprListClause(
llvm::omp::OMPC_to, OMPVarListLocTy(), Sizes,
7416 "Unexpected index to store motion modifier, exceeds array size.");
7417MotionModifiers[I] =
T;
7424 voidsetMotionModifierLoc(
unsignedI, SourceLocation TLoc) {
7426 "Index to store motion modifier location exceeds array size.");
7427MotionModifiersLoc[I] = TLoc;
7431 voidsetColonLoc(SourceLocation
Loc) { ColonLoc =
Loc; }
7435 size_tnumTrailingObjects(OverloadToken<Expr *>)
const{
7440 size_tnumTrailingObjects(OverloadToken<ValueDecl *>)
const{
7443 size_tnumTrailingObjects(OverloadToken<unsigned>)
const{
7464 staticOMPToClause *
Create(
constASTContext &
C,
constOMPVarListLocTy &Locs,
7465ArrayRef<Expr *> Vars,
7466ArrayRef<ValueDecl *> Declarations,
7468ArrayRef<Expr *> UDMapperRefs,
7469ArrayRef<OpenMPMotionModifierKind> MotionModifiers,
7470ArrayRef<SourceLocation> MotionModifiersLoc,
7471NestedNameSpecifierLoc UDMQualifierLoc,
7472DeclarationNameInfo MapperId);
7482 staticOMPToClause *
CreateEmpty(
constASTContext &
C,
7483 constOMPMappableExprListSizeTy &Sizes);
7490 "Requested modifier exceeds the total number of modifiers.");
7491 returnMotionModifiers[Cnt];
7500 "Requested modifier location exceeds total number of modifiers.");
7501 returnMotionModifiersLoc[Cnt];
7535 return T->getClauseKind() == llvm::omp::OMPC_to;
7549 privatellvm::TrailingObjects<
7550OMPFromClause, Expr *, ValueDecl *, unsigned,
7551OMPClauseMappableExprCommon::MappableComponent> {
7555 friendTrailingObjects;
7589 true, &MapperQualifierLoc,
7591assert(std::size(MotionModifiers) == TheMotionModifiers.size() &&
7592 "Unexpected number of motion modifiers.");
7593llvm::copy(TheMotionModifiers, std::begin(MotionModifiers));
7595assert(std::size(MotionModifiersLoc) == TheMotionModifiersLoc.size() &&
7596 "Unexpected number of motion modifier locations.");
7597llvm::copy(TheMotionModifiersLoc, std::begin(MotionModifiersLoc));
7607 explicitOMPFromClause(
constOMPMappableExprListSizeTy &Sizes)
7608: OMPMappableExprListClause(
llvm::omp::OMPC_from, OMPVarListLocTy(),
7617 "Unexpected index to store motion modifier, exceeds array size.");
7618MotionModifiers[I] =
T;
7625 voidsetMotionModifierLoc(
unsignedI, SourceLocation TLoc) {
7627 "Index to store motion modifier location exceeds array size.");
7628MotionModifiersLoc[I] = TLoc;
7632 voidsetColonLoc(SourceLocation
Loc) { ColonLoc =
Loc; }
7636 size_tnumTrailingObjects(OverloadToken<Expr *>)
const{
7641 size_tnumTrailingObjects(OverloadToken<ValueDecl *>)
const{
7644 size_tnumTrailingObjects(OverloadToken<unsigned>)
const{
7665 staticOMPFromClause *
7666 Create(
constASTContext &
C,
constOMPVarListLocTy &Locs,
7667ArrayRef<Expr *> Vars, ArrayRef<ValueDecl *> Declarations,
7669ArrayRef<Expr *> UDMapperRefs,
7670ArrayRef<OpenMPMotionModifierKind> MotionModifiers,
7671ArrayRef<SourceLocation> MotionModifiersLoc,
7672NestedNameSpecifierLoc UDMQualifierLoc, DeclarationNameInfo MapperId);
7682 staticOMPFromClause *
CreateEmpty(
constASTContext &
C,
7683 constOMPMappableExprListSizeTy &Sizes);
7690 "Requested modifier exceeds the total number of modifiers.");
7691 returnMotionModifiers[Cnt];
7700 "Requested modifier location exceeds total number of modifiers.");
7701 returnMotionModifiersLoc[Cnt];
7735 return T->getClauseKind() == llvm::omp::OMPC_from;
7749 privatellvm::TrailingObjects<
7750OMPUseDevicePtrClause, Expr *, ValueDecl *, unsigned,
7751OMPClauseMappableExprCommon::MappableComponent> {
7755 friendTrailingObjects;
7785 size_tnumTrailingObjects(OverloadToken<Expr *>)
const{
7788 size_tnumTrailingObjects(OverloadToken<ValueDecl *>)
const{
7791 size_tnumTrailingObjects(OverloadToken<unsigned>)
const{
7798 voidsetPrivateCopies(ArrayRef<Expr *> VL);
7802MutableArrayRef<Expr *> getPrivateCopies() {
7805ArrayRef<const Expr *> getPrivateCopies()
const{
7812 voidsetInits(ArrayRef<Expr *> VL);
7816MutableArrayRef<Expr *> getInits() {
7817 returnMutableArrayRef<Expr *>(getPrivateCopies().end(),
varlist_size());
7819ArrayRef<const Expr *> getInits()
const{
7835 staticOMPUseDevicePtrClause *
7836 Create(
constASTContext &
C,
constOMPVarListLocTy &Locs,
7837ArrayRef<Expr *> Vars, ArrayRef<Expr *> PrivateVars,
7838ArrayRef<Expr *> Inits, ArrayRef<ValueDecl *> Declarations,
7849 staticOMPUseDevicePtrClause *
7850 CreateEmpty(
constASTContext &
C,
constOMPMappableExprListSizeTy &Sizes);
7856llvm::iterator_range<private_copies_const_iterator>;
7860getPrivateCopies().end());
7865getPrivateCopies().end());
7874 return inits_range(getInits().begin(), getInits().end());
7899 return T->getClauseKind() == llvm::omp::OMPC_use_device_ptr;
7913 privatellvm::TrailingObjects<
7914OMPUseDeviceAddrClause, Expr *, ValueDecl *, unsigned,
7915OMPClauseMappableExprCommon::MappableComponent> {
7919 friendTrailingObjects;
7949 size_tnumTrailingObjects(OverloadToken<Expr *>)
const{
7952 size_tnumTrailingObjects(OverloadToken<ValueDecl *>)
const{
7955 size_tnumTrailingObjects(OverloadToken<unsigned>)
const{
7969 staticOMPUseDeviceAddrClause *
7970 Create(
constASTContext &
C,
constOMPVarListLocTy &Locs,
7971ArrayRef<Expr *> Vars, ArrayRef<ValueDecl *> Declarations,
7982 staticOMPUseDeviceAddrClause *
7983 CreateEmpty(
constASTContext &
C,
constOMPMappableExprListSizeTy &Sizes);
8003 return T->getClauseKind() == llvm::omp::OMPC_use_device_addr;
8017 privatellvm::TrailingObjects<
8018OMPIsDevicePtrClause, Expr *, ValueDecl *, unsigned,
8019OMPClauseMappableExprCommon::MappableComponent> {
8023 friendTrailingObjects;
8052 size_tnumTrailingObjects(OverloadToken<Expr *>)
const{
8055 size_tnumTrailingObjects(OverloadToken<ValueDecl *>)
const{
8058 size_tnumTrailingObjects(OverloadToken<unsigned>)
const{
8072 staticOMPIsDevicePtrClause *
8073 Create(
constASTContext &
C,
constOMPVarListLocTy &Locs,
8074ArrayRef<Expr *> Vars, ArrayRef<ValueDecl *> Declarations,
8085 staticOMPIsDevicePtrClause *
8086 CreateEmpty(
constASTContext &
C,
constOMPMappableExprListSizeTy &Sizes);
8106 return T->getClauseKind() == llvm::omp::OMPC_is_device_ptr;
8120 privatellvm::TrailingObjects<
8121OMPHasDeviceAddrClause, Expr *, ValueDecl *, unsigned,
8122OMPClauseMappableExprCommon::MappableComponent> {
8126 friendTrailingObjects;
8156 size_tnumTrailingObjects(OverloadToken<Expr *>)
const{
8159 size_tnumTrailingObjects(OverloadToken<ValueDecl *>)
const{
8162 size_tnumTrailingObjects(OverloadToken<unsigned>)
const{
8176 staticOMPHasDeviceAddrClause *
8177 Create(
constASTContext &
C,
constOMPVarListLocTy &Locs,
8178ArrayRef<Expr *> Vars, ArrayRef<ValueDecl *> Declarations,
8189 staticOMPHasDeviceAddrClause *
8190 CreateEmpty(
constASTContext &
C,
constOMPMappableExprListSizeTy &Sizes);
8210 return T->getClauseKind() == llvm::omp::OMPC_has_device_addr;
8223 privatellvm::TrailingObjects<OMPNontemporalClause, Expr *> {
8226 friendTrailingObjects;
8237StartLoc, LParenLoc, EndLoc, N) {
8250MutableArrayRef<Expr *> getPrivateRefs() {
8253ArrayRef<const Expr *> getPrivateRefs()
const{
8265 staticOMPNontemporalClause *
8266 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
8267SourceLocation EndLoc, ArrayRef<Expr *> VL);
8273 staticOMPNontemporalClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
8290 return child_range(
reinterpret_cast<Stmt**
>(getPrivateRefs().begin()),
8291 reinterpret_cast<Stmt**
>(getPrivateRefs().end()));
8307 return T->getClauseKind() == llvm::omp::OMPC_nontemporal;
8354 voidsetModifierKwLoc(SourceLocation MLoc) { ModifierKwLoc = MLoc; }
8371LParenLoc(LParenLoc),
Kind(A), KindKwLoc(ALoc), Modifier(Modifier),
8372ModifierKwLoc(MLoc) {}
8412 return T->getClauseKind() == llvm::omp::OMPC_order;
8423 privatellvm::TrailingObjects<OMPInitClause, Expr *> {
8426 friendTrailingObjects;
8431 boolIsTarget =
false;
8432 boolIsTargetSync =
false;
8436 voidsetIsTarget(
bool V) { IsTarget =
V; }
8438 voidsetIsTargetSync(
bool V) { IsTargetSync =
V; }
8441 voidsetVarLoc(SourceLocation
Loc) { VarLoc =
Loc; }
8452OMPInitClause(
boolIsTarget,
boolIsTargetSync, SourceLocation StartLoc,
8453SourceLocation LParenLoc, SourceLocation VarLoc,
8454SourceLocation EndLoc,
unsignedN)
8455: OMPVarListClause<OMPInitClause>(
llvm::omp::OMPC_init, StartLoc,
8456LParenLoc, EndLoc, N),
8457VarLoc(VarLoc), IsTarget(IsTarget), IsTargetSync(IsTargetSync) {}
8460OMPInitClause(
unsignedN)
8461: OMPVarListClause<OMPInitClause>(
llvm::omp::OMPC_init, SourceLocation(),
8462SourceLocation(), SourceLocation(), N) {
8475 staticOMPInitClause *
Create(
constASTContext &
C, Expr *InteropVar,
8476OMPInteropInfo &InteropInfo,
8477SourceLocation StartLoc,
8478SourceLocation LParenLoc, SourceLocation VarLoc,
8479SourceLocation EndLoc);
8485 staticOMPInitClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
8533 return T->getClauseKind() == llvm::omp::OMPC_init;
8552 Stmt*InteropVar =
nullptr;
8555 voidsetInteropVar(
Expr*
E) { InteropVar =
E; }
8561 voidsetVarLoc(SourceLocation
Loc) { VarLoc =
Loc; }
8574:
OMPClause(
llvm::omp::OMPC_use, StartLoc, EndLoc), LParenLoc(LParenLoc),
8575VarLoc(VarLoc), InteropVar(InteropVar) {}
8604 return T->getClauseKind() == llvm::omp::OMPC_use;
8627 Stmt*InteropVar =
nullptr;
8630 voidsetInteropVar(
Expr*
E) { InteropVar =
E; }
8636 voidsetVarLoc(SourceLocation
Loc) { VarLoc =
Loc; }
8650LParenLoc(LParenLoc), VarLoc(VarLoc), InteropVar(InteropVar) {}
8657:
OMPClause(
llvm::omp::OMPC_destroy, StartLoc, EndLoc) {}
8675 return child_range(&InteropVar, &InteropVar + 1);
8693 return T->getClauseKind() == llvm::omp::OMPC_destroy;
8710 voidsetCondition(
Expr*Cond) {
setStmt(Cond); }
8757 voidsetCondition(
Expr*Cond) {
setStmt(Cond); }
8831 privatellvm::TrailingObjects<OMPInclusiveClause, Expr *> {
8834 friendTrailingObjects;
8845StartLoc, LParenLoc, EndLoc, N) {}
8863 staticOMPInclusiveClause *
Create(
constASTContext &
C,
8864SourceLocation StartLoc,
8865SourceLocation LParenLoc,
8866SourceLocation EndLoc, ArrayRef<Expr *> VL);
8872 staticOMPInclusiveClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
8892 return T->getClauseKind() == llvm::omp::OMPC_inclusive;
8905 privatellvm::TrailingObjects<OMPExclusiveClause, Expr *> {
8908 friendTrailingObjects;
8919StartLoc, LParenLoc, EndLoc, N) {}
8937 staticOMPExclusiveClause *
Create(
constASTContext &
C,
8938SourceLocation StartLoc,
8939SourceLocation LParenLoc,
8940SourceLocation EndLoc, ArrayRef<Expr *> VL);
8946 staticOMPExclusiveClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
8966 return T->getClauseKind() == llvm::omp::OMPC_exclusive;
8980 privatellvm::TrailingObjects<OMPUsesAllocatorsClause, Expr *,
8995 friendTrailingObjects;
8997 enum classExprOffsets {
9003 enum classParenLocsOffsets {
9010SourceLocation LParenLoc;
9012 unsignedNumOfAllocators = 0;
9020OMPUsesAllocatorsClause(SourceLocation StartLoc, SourceLocation LParenLoc,
9021SourceLocation EndLoc,
unsignedN)
9022: OMPClause(
llvm::omp::OMPC_uses_allocators, StartLoc, EndLoc),
9023LParenLoc(LParenLoc), NumOfAllocators(N) {}
9028 explicitOMPUsesAllocatorsClause(
unsignedN)
9029:
OMPClause(
llvm::omp::OMPC_uses_allocators, SourceLocation(),
9031NumOfAllocators(N) {}
9033 unsignednumTrailingObjects(OverloadToken<Expr *>)
const{
9034 returnNumOfAllocators *
static_cast<int>(ExprOffsets::Total);
9038 voidsetLParenLoc(SourceLocation
Loc) { LParenLoc =
Loc; }
9041 voidsetAllocatorsData(ArrayRef<OMPUsesAllocatorsClause::Data>
Data);
9051 staticOMPUsesAllocatorsClause *
9052 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
9053SourceLocation EndLoc, ArrayRef<OMPUsesAllocatorsClause::Data>
Data);
9059 staticOMPUsesAllocatorsClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
9072 Stmt**
Begin=
reinterpret_cast<Stmt**
>(getTrailingObjects<Expr *>());
9074 static_cast<int>(ExprOffsets::Total));
9078 reinterpret_cast<Stmt*
const*
>(getTrailingObjects<Expr *>());
9080 Begin,
Begin+ NumOfAllocators *
static_cast<int>(ExprOffsets::Total));
9091 return T->getClauseKind() == llvm::omp::OMPC_uses_allocators;
9106 privatellvm::TrailingObjects<OMPAffinityClause, Expr *> {
9109 friendTrailingObjects;
9124LParenLoc, EndLoc, N) {}
9135 voidsetModifier(Expr *
E) {
9140 voidsetColonLoc(SourceLocation
Loc) { ColonLoc =
Loc; }
9151 staticOMPAffinityClause *
Create(
constASTContext &
C, SourceLocation StartLoc,
9152SourceLocation LParenLoc,
9153SourceLocation ColonLoc,
9154SourceLocation EndLoc, Expr *Modifier,
9155ArrayRef<Expr *> Locators);
9161 staticOMPAffinityClause *
CreateEmpty(
constASTContext &
C,
unsignedN);
9192 return T->getClauseKind() == llvm::omp::OMPC_affinity;
9263 voidsetBindKindLoc(SourceLocation KLoc) { KindLoc = KLoc; }
9273SourceLocation StartLoc, SourceLocation LParenLoc,
9274SourceLocation EndLoc)
9291SourceLocation KLoc, SourceLocation StartLoc,
9292SourceLocation LParenLoc, SourceLocation EndLoc);
9297 staticOMPBindClause *
CreateEmpty(
constASTContext &
C);
9311template<
classImplClass,
template<
typename>
classPtr,
typenameRetTy>
9314#define PTR(CLASS) Ptr<CLASS> 9315#define DISPATCH(CLASS) \ 9316 return static_cast<ImplClass*>(this)->Visit##CLASS(static_cast<PTR(CLASS)>(S)) 9318#define GEN_CLANG_CLAUSE_CLASS 9319#define CLAUSE_CLASS(Enum, Str, Class) \ 9320 RetTy Visit##Class(PTR(Class) S) { DISPATCH(Class); } 9321#include "llvm/Frontend/OpenMP/OMP.inc" 9325 switch(S->getClauseKind()) {
9326#define GEN_CLANG_CLAUSE_CLASS 9327#define CLAUSE_CLASS(Enum, Str, Class) \ 9328 case llvm::omp::Clause::Enum: \ 9329 return Visit##Class(static_cast<PTR(Class)>(S)); 9330#define CLAUSE_NO_CLASS(Enum, Str) \ 9331 case llvm::omp::Clause::Enum: \ 9333#include "llvm/Frontend/OpenMP/OMP.inc" 9342template<
typenameT>
using const_ptr= std::add_pointer_t<std::add_const_t<T>>;
9344template<
classImplClass,
typenameRetTy =
void>
9347template<
classImplClass,
typenameRetTy =
void>
9356 template<
typenameT>
voidVisitOMPClauseList(
T*
Node,
charStartSym);
9358 template<
typenameT>
voidVisitOMPMotionClause(
T*
Node);
9362: OS(OS), Policy(Policy) {}
9364#define GEN_CLANG_CLAUSE_CLASS 9365#define CLAUSE_CLASS(Enum, Str, Class) void Visit##Class(Class *S); 9366#include "llvm/Frontend/OpenMP/OMP.inc" 9370llvm::omp::TraitProperty
Kind= llvm::omp::TraitProperty::invalid;
9378llvm::omp::TraitSelector
Kind= llvm::omp::TraitSelector::invalid;
9382llvm::omp::TraitSet
Kind= llvm::omp::TraitSet::invalid;
9404llvm::function_ref<
bool(
Expr*&,
bool)> Cond) {
9406 returnllvm::any_of(
9408return Cond(Selector.ScoreOrCondition,
9410llvm::omp::TraitSelector::user_condition);
9421llvm::omp::VariantMatchInfo &VMI)
const;
9429 if(
Set.Kind != llvm::omp::TraitSet::implementation)
9432 if(
Selector.Kind != llvm::omp::TraitSelector::implementation_extension)
9446llvm::raw_ostream &
operator<<(llvm::raw_ostream &OS,
constOMPTraitInfo &TI);
9447llvm::raw_ostream &
operator<<(llvm::raw_ostream &OS,
constOMPTraitInfo *TI);
9452std::function<
void(StringRef)> &&DiagUnknownTrait,
9462std::function<
bool(StringRef)> FeatureValidityCheck;
9463std::function<void(StringRef)> DiagUnknownTrait;
9464llvm::StringMap<bool> FeatureMap;
9471:
privatellvm::TrailingObjects<OMPChildren, OMPClause *, Stmt *> {
9472 friendTrailingObjects;
9478 unsignedNumClauses = 0;
9480 unsignedNumChildren = 0;
9482 boolHasAssociatedStmt =
false;
9486 size_tnumTrailingObjects(OverloadToken<OMPClause *>)
const{
9492 OMPChildren(
unsignedNumClauses,
unsignedNumChildren,
boolHasAssociatedStmt)
9493: NumClauses(NumClauses), NumChildren(NumChildren),
9494HasAssociatedStmt(HasAssociatedStmt) {}
9496 static size_tsize(
unsignedNumClauses,
boolHasAssociatedStmt,
9497 unsignedNumChildren);
9499 staticOMPChildren *
Create(
void*Mem, ArrayRef<OMPClause *> Clauses);
9500 staticOMPChildren *
Create(
void*Mem, ArrayRef<OMPClause *> Clauses, Stmt *S,
9501 unsignedNumChildren = 0);
9502 staticOMPChildren *CreateEmpty(
void*Mem,
unsignedNumClauses,
9503 boolHasAssociatedStmt =
false,
9504 unsignedNumChildren = 0);
9513getTrailingObjects<Stmt *>()[NumChildren] = S;
9529assert(HasAssociatedStmt &&
9530 "Expected directive with the associated statement.");
9531 returngetTrailingObjects<Stmt *>()[NumChildren];
9550assert(llvm::is_contained(CaptureRegions, RegionKind) &&
9551 "RegionKind not found in OpenMP CaptureRegions.");
9553 for(
autoThisCaptureRegion : CaptureRegions) {
9554 if(ThisCaptureRegion == RegionKind)
9556CS = cast<CapturedStmt>(CS->getCapturedStmt());
9558llvm_unreachable(
"Incorrect RegionKind specified for directive.");
9565assert(!CaptureRegions.empty() &&
9566 "At least one captured statement must be provided.");
9568 for(
unsignedLevel = CaptureRegions.size(); Level > 1; --Level)
9569CS = cast<CapturedStmt>(CS->getCapturedStmt());
9585assert(HasAssociatedStmt &&
9586 "Expected directive with the associated statement.");
9590S = CS->getCapturedStmt();
9591CS = dyn_cast<CapturedStmt>(S);
9602 if(!HasAssociatedStmt)
9605&getTrailingObjects<Stmt *>()[NumChildren + 1]);
9616:
public OMPOneStmtClause<llvm::omp::OMPC_ompx_dyn_cgroup_mem, OMPClause>,
9661 privatellvm::TrailingObjects<OMPDoacrossClause, Expr *> {
9664 friendTrailingObjects;
9676 unsignedNumLoops = 0;
9688LParenLoc, EndLoc, N),
9689NumLoops(NumLoops) {}
9699NumLoops(NumLoops) {}
9705 voidsetDependenceLoc(SourceLocation
Loc) { DepLoc =
Loc; }
9708 voidsetColonLoc(SourceLocation
Loc) { ColonLoc =
Loc; }
9722 staticOMPDoacrossClause *
9723 Create(
constASTContext &
C, SourceLocation StartLoc, SourceLocation LParenLoc,
9725SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef<Expr *> VL,
9733 staticOMPDoacrossClause *
CreateEmpty(
constASTContext &
C,
unsignedN,
9773 return T->getClauseKind() == llvm::omp::OMPC_doacross;
9802:
OMPNoChildClause(StartLoc, EndLoc), LParenLoc(LParenLoc), Attrs(Attrs) {
9821Attrs.append(NewAttrs.begin(), NewAttrs.end());
Forward declaration of all AST node types.
enum clang::sema::@1704::IndirectLocalPathEntry::EntryKind Kind
static const Decl * getCanonicalDecl(const Decl *D)
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines some OpenMP-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 captures a statement into a function.
This represents one expression.
Represents a function declaration or definition.
A C++ nested-name-specifier augmented with source location information.
This represents the 'absent' clause in the '#pragma omp assume' directive.
static OMPAbsentClause * CreateEmpty(const ASTContext &C, unsigned NumKinds)
static bool classof(const OMPClause *C)
This represents 'acq_rel' clause in the '#pragma omp atomic|flush' directives.
static bool classof(const OMPClause *T)
OMPAcqRelClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'ack_rel' clause.
const_child_range used_children() const
child_range used_children()
const_child_range children() const
OMPAcqRelClause()
Build an empty clause.
This represents 'acquire' clause in the '#pragma omp atomic|flush' directives.
static bool classof(const OMPClause *T)
const_child_range children() const
OMPAcquireClause()
Build an empty clause.
child_range used_children()
const_child_range used_children() const
OMPAcquireClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'acquire' clause.
This represents clause 'affinity' in the '#pragma omp task'-based directives.
child_range used_children()
Expr * getModifier()
Gets affinity modifier.
const_child_range children() const
static OMPAffinityClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N locator items.
SourceLocation getColonLoc() const
Gets the location of ':' symbol.
const_child_range used_children() const
static bool classof(const OMPClause *T)
Expr * getModifier() const
This represents the 'align' clause in the '#pragma omp allocate' directive.
Expr * getAlignment() const
Returns alignment.
This represents clause 'aligned' in the '#pragma omp ...' directives.
Expr * getAlignment()
Returns alignment.
const Expr * getAlignment() const
Returns alignment.
void setColonLoc(SourceLocation Loc)
Sets the location of ':'.
const_child_range used_children() const
static OMPAlignedClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
const_child_range children() const
SourceLocation getColonLoc() const
Returns the location of ':'.
static bool classof(const OMPClause *T)
child_range used_children()
This represents clause 'allocate' in the '#pragma omp ...' directives.
const_child_range children() const
SourceLocation getAllocatorModifierLoc() const
Return the location of the modifier.
const_child_range used_children() const
OpenMPAllocateClauseModifier getAllocatorModifier() const
Return 'allocate' modifier.
OpenMPAllocateClauseModifier getSecondAllocateModifier() const
Get the second modifier of the clause.
SourceLocation getColonLoc() const
Returns the location of the ':' delimiter.
Expr * getAlignment() const
Returns the alignment expression or nullptr, if no alignment specified.
OpenMPAllocateClauseModifier getFirstAllocateModifier() const
Get the first modifier of the clause.
Expr * getAllocator() const
Returns the allocator expression or nullptr, if no allocator is specified.
SourceLocation getSecondAllocateModifierLoc() const
Get location of second modifier of the clause.
child_range used_children()
SourceLocation getFirstAllocateModifierLoc() const
Get location of first modifier of the clause.
static OMPAllocateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
static bool classof(const OMPClause *T)
This represents 'allocator' clause in the '#pragma omp ...' directive.
OMPAllocatorClause(Expr *A, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'allocator' clause with the given allocator.
OMPAllocatorClause()
Build an empty clause.
Expr * getAllocator() const
Returns allocator.
This represents 'at' clause in the '#pragma omp error' directive.
OMPAtClause(OpenMPAtClauseKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'at' clause with argument A ('compilation' or 'execution').
SourceLocation getAtKindKwLoc() const
Returns location of clause kind.
static bool classof(const OMPClause *T)
OpenMPAtClauseKind getAtKind() const
Returns kind of the clause.
const_child_range used_children() const
child_range used_children()
SourceLocation getLParenLoc() const
Returns the locaiton of '('.
OMPAtClause()
Build an empty clause.
const_child_range children() const
This represents 'atomic_default_mem_order' clause in the '#pragma omp requires' directive.
const_child_range used_children() const
static bool classof(const OMPClause *T)
SourceLocation getLParenLoc() const
Returns the locaiton of '('.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OpenMPAtomicDefaultMemOrderClauseKind getAtomicDefaultMemOrderKind() const
Returns kind of the clause.
OMPAtomicDefaultMemOrderClause(OpenMPAtomicDefaultMemOrderClauseKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'atomic_default_mem_order' clause with argument A ('seq_cst', 'acq_rel' or 'relaxed').
child_range used_children()
const_child_range children() const
OMPAtomicDefaultMemOrderClause()
Build an empty clause.
SourceLocation getAtomicDefaultMemOrderKindKwLoc() const
Returns location of clause kind.
This represents 'bind' clause in the '#pragma omp ...' directives.
OpenMPBindClauseKind getBindKind() const
Returns kind of the clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getBindKindLoc() const
Returns location of clause kind.
static OMPBindClause * CreateEmpty(const ASTContext &C)
Build an empty 'bind' clause.
This represents 'capture' clause in the '#pragma omp atomic' directive.
OMPCaptureClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'capture' clause.
const_child_range used_children() const
child_range used_children()
const_child_range children() const
static bool classof(const OMPClause *T)
OMPCaptureClause()
Build an empty clause.
Contains data for OpenMP directives: clauses, children expressions/statements (helpers for codegen) a...
unsigned getNumClauses() const
const CapturedStmt * getCapturedStmt(OpenMPDirectiveKind RegionKind, ArrayRef< OpenMPDirectiveKind > CaptureRegions) const
Returns the captured statement associated with the component region within the (combined) directive.
bool hasAssociatedStmt() const
Stmt::child_range getAssociatedStmtAsRange()
void setClauses(ArrayRef< OMPClause * > Clauses)
Sets the list of variables for this clause.
unsigned getNumChildren() const
const Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
Stmt * getAssociatedStmt()
void setChildren(ArrayRef< Stmt * > Children)
ArrayRef< Stmt * > getChildren() const
MutableArrayRef< OMPClause * > getClauses()
Get the clauses storage.
MutableArrayRef< Stmt * > getChildren()
const Stmt * getRawStmt() const
void setAssociatedStmt(Stmt *S)
Set associated statement.
CapturedStmt * getInnermostCapturedStmt(ArrayRef< OpenMPDirectiveKind > CaptureRegions)
Get innermost captured statement for the construct.
ArrayRef< OMPClause * > getClauses() const
const CapturedStmt * getInnermostCapturedStmt(ArrayRef< OpenMPDirectiveKind > CaptureRegions) const
Class that represents a component of a mappable expression.
MappableComponent(Expr *AssociatedExpression, ValueDecl *AssociatedDeclaration, bool IsNonContiguous)
bool isNonContiguous() const
Expr * getAssociatedExpression() const
MappableComponent()=default
ValueDecl * getAssociatedDeclaration() const
Struct that defines common infrastructure to handle mappable expressions used in OpenMP clauses.
ArrayRef< MappableExprComponentList > MappableExprComponentListsRef
static unsigned getUniqueDeclarationsTotalNumber(ArrayRef< const ValueDecl * > Declarations)
static unsigned getComponentsTotalNumber(MappableExprComponentListsRef ComponentLists)
ArrayRef< MappableComponent > MappableExprComponentListRef
OMPClausePrinter(raw_ostream &OS, const PrintingPolicy &Policy)
This class implements a simple visitor for OMPClause subclasses.
RetTy VisitOMPClause(PTR(OMPClause) Node)
RetTy Visit(PTR(OMPClause) S)
Class that handles post-update expression for some clauses, like 'lastprivate', 'reduction' etc.
void setPostUpdateExpr(Expr *S)
Set pre-initialization statement for the clause.
static OMPClauseWithPostUpdate * get(OMPClause *C)
Expr * getPostUpdateExpr()
Get post-update expression for the clause.
OMPClauseWithPostUpdate(const OMPClause *This)
const Expr * getPostUpdateExpr() const
Get post-update expression for the clause.
Class that handles pre-initialization statement for some clauses, like 'schedule',...
const Stmt * getPreInitStmt() const
Get pre-initialization statement for the clause.
OMPClauseWithPreInit(const OMPClause *This)
OpenMPDirectiveKind getCaptureRegion() const
Get capture region for the stmt in the clause.
Stmt * getPreInitStmt()
Get pre-initialization statement for the clause.
static OMPClauseWithPreInit * get(OMPClause *C)
void setPreInitStmt(Stmt *S, OpenMPDirectiveKind ThisRegion=llvm::omp::OMPD_unknown)
Set pre-initialization statement for the clause.
This is a basic class for representing single OpenMP clause.
const_child_range children() const
void setLocStart(SourceLocation Loc)
Sets the starting location of the clause.
static bool classof(const OMPClause *)
SourceLocation getBeginLoc() const
Returns the starting location of the clause.
llvm::iterator_range< const_child_iterator > const_child_range
ConstStmtIterator const_child_iterator
child_range used_children()
Get the iterator range for the expressions used in the clauses.
llvm::iterator_range< child_iterator > child_range
OMPClause(OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation EndLoc)
void setLocEnd(SourceLocation Loc)
Sets the ending location of the clause.
StmtIterator child_iterator
SourceLocation getEndLoc() const
Returns the ending location of the clause.
OpenMPClauseKind getClauseKind() const
Returns kind of OpenMP clause (private, shared, reduction, etc.).
const_child_range used_children() const
This represents 'collapse' clause in the '#pragma omp ...' directive.
OMPCollapseClause()
Build an empty clause.
Expr * getNumForLoops() const
Return the number of associated for-loops.
OMPCollapseClause(Expr *Num, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'collapse' clause.
This represents 'compare' clause in the '#pragma omp atomic' directive.
const_child_range used_children() const
OMPCompareClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'compare' clause.
child_range used_children()
const_child_range children() const
OMPCompareClause()
Build an empty clause.
static bool classof(const OMPClause *T)
This represents the 'contains' clause in the '#pragma omp assume' directive.
static OMPContainsClause * CreateEmpty(const ASTContext &C, unsigned NumKinds)
static bool classof(const OMPClause *C)
This represents clause 'copyin' in the '#pragma omp ...' directives.
helper_expr_range assignment_ops()
MutableArrayRef< Expr * >::iterator helper_expr_iterator
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
const_child_range children() const
helper_expr_const_range source_exprs() const
llvm::iterator_range< helper_expr_iterator > helper_expr_range
helper_expr_range source_exprs()
static bool classof(const OMPClause *T)
const_child_range used_children() const
child_range used_children()
helper_expr_const_range destination_exprs() const
helper_expr_range destination_exprs()
helper_expr_const_range assignment_ops() const
static OMPCopyinClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
helper_expr_range source_exprs()
MutableArrayRef< Expr * >::iterator helper_expr_iterator
llvm::iterator_range< helper_expr_iterator > helper_expr_range
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
child_range used_children()
helper_expr_const_range destination_exprs() const
helper_expr_range destination_exprs()
const_child_range children() const
static bool classof(const OMPClause *T)
const_child_range used_children() const
helper_expr_const_range source_exprs() const
static OMPCopyprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
helper_expr_range assignment_ops()
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
helper_expr_const_range assignment_ops() const
This is a basic class for representing single OpenMP declarative directive.
This represents 'default' clause in the '#pragma omp ...' directive.
const_child_range used_children() const
SourceLocation getLParenLoc() const
Returns the location of '('.
llvm::omp::DefaultKind getDefaultKind() const
Returns kind of the clause.
SourceLocation getDefaultKindKwLoc() const
Returns location of clause kind.
OMPDefaultClause(llvm::omp::DefaultKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'default' clause with argument A ('none' or 'shared').
static bool classof(const OMPClause *T)
child_range used_children()
const_child_range children() const
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OMPDefaultClause()
Build an empty clause.
This represents 'defaultmap' clause in the '#pragma omp ...' directive.
const_child_range children() const
SourceLocation getDefaultmapKindLoc()
Get kind location.
static bool classof(const OMPClause *T)
OMPDefaultmapClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KLoc, SourceLocation EndLoc, OpenMPDefaultmapClauseKind Kind, OpenMPDefaultmapClauseModifier M)
Build 'defaultmap' clause with defaultmap kind Kind.
child_range used_children()
OpenMPDefaultmapClauseModifier getDefaultmapModifier() const
Get the modifier of the clause.
OMPDefaultmapClause()
Build an empty clause.
SourceLocation getDefaultmapModifierLoc() const
Get the modifier location.
const_child_range used_children() const
SourceLocation getLParenLoc()
Get location of '('.
OpenMPDefaultmapClauseKind getDefaultmapKind() const
Get kind of the clause.
This represents implicit clause 'depend' for the '#pragma omp task' directive.
SourceLocation getDependencyLoc() const
Get dependency type location.
static bool classof(const OMPClause *T)
unsigned getNumLoops() const
Get number of loops associated with the clause.
Expr * getModifier()
Return optional depend modifier.
Expr * getLoopData(unsigned NumLoop)
Get the loop data.
SourceLocation getOmpAllMemoryLoc() const
Get 'omp_all_memory' location.
const_child_range used_children() const
void setLoopData(unsigned NumLoop, Expr *Cnt)
Set the loop data for the depend clauses with 'sink|source' kind of dependency.
const_child_range children() const
static OMPDependClause * CreateEmpty(const ASTContext &C, unsigned N, unsigned NumLoops)
Creates an empty clause with N variables.
const Expr * getModifier() const
child_range used_children()
SourceLocation getColonLoc() const
Get colon location.
OpenMPDependClauseKind getDependencyKind() const
Get dependency type.
This represents implicit clause 'depobj' for the '#pragma omp depobj' directive.
SourceLocation getLParenLoc() const
Returns the location of '('.
static bool classof(const OMPClause *T)
const_child_range used_children() const
const_child_range children() const
static OMPDepobjClause * CreateEmpty(const ASTContext &C)
Creates an empty clause.
Expr * getDepobj()
Returns depobj expression associated with the clause.
child_range used_children()
const Expr * getDepobj() const
This represents 'destroy' clause in the '#pragma omp depobj' directive or the '#pragma omp interop' d...
static bool classof(const OMPClause *T)
SourceLocation getLParenLoc() const
Returns the location of '('.
OMPDestroyClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'destroy' clause.
child_range used_children()
const_child_range children() const
OMPDestroyClause(Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Build 'destroy' clause with an interop variable expression InteropVar.
SourceLocation getVarLoc() const
Returns the location of the interop variable.
Expr * getInteropVar() const
Returns the interop variable.
OMPDestroyClause()
Build an empty clause.
const_child_range used_children() const
This represents 'detach' clause in the '#pragma omp task' directive.
OMPDetachClause(Expr *Evt, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'detach' clause with event-handler Evt.
OMPDetachClause()
Build an empty clause.
Expr * getEventHandler() const
Returns event-handler expression.
This represents 'device' clause in the '#pragma omp ...' directive.
OMPDeviceClause()
Build an empty clause.
const_child_range used_children() const
OpenMPDeviceClauseModifier getModifier() const
Gets modifier.
child_range used_children()
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
const_child_range children() const
Expr * getDevice()
Return device number.
Expr * getDevice() const
Return device number.
OMPDeviceClause(OpenMPDeviceClauseModifier Modifier, Expr *E, Stmt *HelperE, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
Build 'device' clause.
SourceLocation getModifierLoc() const
Gets modifier location.
static bool classof(const OMPClause *T)
SourceLocation getLParenLoc() const
Returns the location of '('.
Class that represents a list of directive kinds (parallel, target, etc.) as used in absent,...
MutableArrayRef< OpenMPDirectiveKind > getDirectiveKinds()
void setDirectiveKinds(ArrayRef< OpenMPDirectiveKind > DK)
SourceLocation getLParenLoc()
const_child_range children() const
unsigned NumKinds
Number of directive kinds listed in the clause.
void setLParenLoc(SourceLocation S)
const_child_range used_children() const
OMPDirectiveListClause(OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, unsigned NumKinds)
Build a clause with NumKinds directive kinds.
child_range used_children()
This represents 'dist_schedule' clause in the '#pragma omp ...' directive.
OMPDistScheduleClause()
Build an empty clause.
const_child_range used_children() const
SourceLocation getCommaLoc()
Get location of ','.
const_child_range children() const
SourceLocation getDistScheduleKindLoc()
Get kind location.
OMPDistScheduleClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KLoc, SourceLocation CommaLoc, SourceLocation EndLoc, OpenMPDistScheduleClauseKind Kind, Expr *ChunkSize, Stmt *HelperChunkSize)
Build 'dist_schedule' clause with schedule kind Kind and chunk size expression ChunkSize.
const Expr * getChunkSize() const
Get chunk size.
OpenMPDistScheduleClauseKind getDistScheduleKind() const
Get kind of the clause.
Expr * getChunkSize()
Get chunk size.
SourceLocation getLParenLoc()
Get location of '('.
child_range used_children()
static bool classof(const OMPClause *T)
This represents the 'doacross' clause for the '#pragma omp ordered' directive.
const_child_range children() const
const_child_range used_children() const
child_range used_children()
static bool classof(const OMPClause *T)
void setLoopData(unsigned NumLoop, Expr *Cnt)
Set the loop data.
Expr * getLoopData(unsigned NumLoop)
Get the loop data.
SourceLocation getColonLoc() const
Get colon location.
unsigned getNumLoops() const
Get number of loops associated with the clause.
static OMPDoacrossClause * CreateEmpty(const ASTContext &C, unsigned N, unsigned NumLoops)
Creates an empty clause with N expressions.
OpenMPDoacrossClauseModifier getDependenceType() const
Get dependence type.
SourceLocation getDependenceLoc() const
Get dependence type location.
This represents 'dynamic_allocators' clause in the '#pragma omp requires' directive.
OMPDynamicAllocatorsClause()
Build an empty clause.
OMPDynamicAllocatorsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'dynamic_allocators' clause.
const_child_range children() const
const_child_range used_children() const
static bool classof(const OMPClause *T)
child_range used_children()
This represents clause 'exclusive' in the '#pragma omp scan' directive.
child_range used_children()
const_child_range used_children() const
static OMPExclusiveClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
const_child_range children() const
static bool classof(const OMPClause *T)
This is a basic class for representing single OpenMP executable directive.
This represents 'fail' clause in the '#pragma omp atomic' directive.
OMPFailClause(OpenMPClauseKind FailParameter, SourceLocation FailParameterLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
child_range used_children()
OMPFailClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'fail' clause.
static bool classof(const OMPClause *T)
const_child_range used_children() const
SourceLocation getLParenLoc() const
Gets the location of '(' (for the parameter) in fail clause.
const_child_range children() const
SourceLocation getFailParameterLoc() const
Gets the location of Fail Parameter (type memory-order-clause) in fail clause.
OMPFailClause()
Build an empty clause.
OpenMPClauseKind getFailParameter() const
Gets the parameter (type memory-order-clause) in Fail clause.
This represents 'filter' clause in the '#pragma omp ...' directive.
Expr * getThreadID() const
Return thread identifier.
Expr * getThreadID()
Return thread identifier.
OMPFilterClause(Expr *ThreadID, Stmt *HelperE, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'filter' clause with thread-id ThreadID.
OMPFilterClause()
Build an empty clause.
This represents 'final' clause in the '#pragma omp ...' directive.
child_range used_children()
Expr * getCondition() const
Returns condition.
OMPFinalClause(Expr *Cond, Stmt *HelperCond, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'final' clause with condition Cond.
OMPFinalClause()
Build an empty clause.
const_child_range used_children() const
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
MutableArrayRef< Expr * >::iterator private_copies_iterator
const_child_range children() const
static bool classof(const OMPClause *T)
inits_const_range inits() const
llvm::iterator_range< inits_const_iterator > inits_const_range
ArrayRef< const Expr * >::iterator inits_const_iterator
child_range used_children()
private_copies_const_range private_copies() const
llvm::iterator_range< inits_iterator > inits_range
llvm::iterator_range< private_copies_iterator > private_copies_range
llvm::iterator_range< private_copies_const_iterator > private_copies_const_range
const_child_range used_children() const
private_copies_range private_copies()
ArrayRef< const Expr * >::iterator private_copies_const_iterator
static OMPFirstprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
MutableArrayRef< Expr * >::iterator inits_iterator
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
child_range used_children()
static OMPFlushClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
const_child_range children() const
static bool classof(const OMPClause *T)
const_child_range used_children() const
This represents clause 'from' in the '#pragma omp ...' directives.
const_child_range used_children() const
SourceLocation getColonLoc() const
Get colon location.
OpenMPMotionModifierKind getMotionModifier(unsigned Cnt) const LLVM_READONLY
Fetches the motion-modifier at 'Cnt' index of array of modifiers.
ArrayRef< SourceLocation > getMotionModifiersLoc() const LLVM_READONLY
Fetches ArrayRef of location of motion-modifiers.
static bool classof(const OMPClause *T)
static OMPFromClause * CreateEmpty(const ASTContext &C, const OMPMappableExprListSizeTy &Sizes)
Creates an empty clause with the place for NumVars variables.
ArrayRef< OpenMPMotionModifierKind > getMotionModifiers() const LLVM_READONLY
Fetches ArrayRef of motion-modifiers.
child_range used_children()
SourceLocation getMotionModifierLoc(unsigned Cnt) const LLVM_READONLY
Fetches the motion-modifier location at 'Cnt' index of array of modifiers' locations.
const_child_range children() const
Representation of the 'full' clause of the '#pragma omp unroll' directive.
static OMPFullClause * CreateEmpty(const ASTContext &C)
Build an empty 'full' AST node for deserialization.
This represents 'grainsize' clause in the '#pragma omp ...' directive.
const_child_range children() const
Expr * getGrainsize() const
Return safe iteration space distance.
SourceLocation getLParenLoc() const
Returns the location of '('.
child_range used_children()
SourceLocation getModifierLoc() const
Gets modifier location.
OMPGrainsizeClause(OpenMPGrainsizeClauseModifier Modifier, Expr *Size, Stmt *HelperSize, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
Build 'grainsize' clause.
static bool classof(const OMPClause *T)
const_child_range used_children() const
OMPGrainsizeClause()
Build an empty clause.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OpenMPGrainsizeClauseModifier getModifier() const
Gets modifier.
This represents clause 'has_device_ptr' in the '#pragma omp ...' directives.
const_child_range used_children() const
const_child_range children() const
static bool classof(const OMPClause *T)
static OMPHasDeviceAddrClause * CreateEmpty(const ASTContext &C, const OMPMappableExprListSizeTy &Sizes)
Creates an empty clause with the place for NumVars variables.
child_range used_children()
This represents 'hint' clause in the '#pragma omp ...' directive.
static bool classof(const OMPClause *T)
Expr * getHint() const
Returns number of threads.
const_child_range children() const
OMPHintClause(Expr *Hint, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'hint' clause with expression Hint.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
SourceLocation getLParenLoc() const
Returns the location of '('.
const_child_range used_children() const
OMPHintClause()
Build an empty clause.
child_range used_children()
This represents the 'holds' clause in the '#pragma omp assume' directive.
OMPHoldsClause(Expr *E, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'holds' clause.
OMPHoldsClause()
Build an empty clause.
This represents 'if' clause in the '#pragma omp ...' directive.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
const_child_range used_children() const
SourceLocation getLParenLoc() const
Returns the location of '('.
SourceLocation getColonLoc() const
Return the location of ':'.
static bool classof(const OMPClause *T)
child_range used_children()
Expr * getCondition() const
Returns condition.
OpenMPDirectiveKind getNameModifier() const
Return directive name modifier associated with the clause.
OMPIfClause()
Build an empty clause.
const_child_range children() const
OMPIfClause(OpenMPDirectiveKind NameModifier, Expr *Cond, Stmt *HelperCond, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation NameModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Build 'if' clause with condition Cond.
SourceLocation getNameModifierLoc() const
Return the location of directive name modifier.
This represents clause 'in_reduction' in the '#pragma omp task' directives.
static OMPInReductionClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
static bool classof(const OMPClause *T)
helper_expr_const_range rhs_exprs() const
helper_expr_range taskgroup_descriptors()
MutableArrayRef< Expr * >::iterator helper_expr_iterator
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
llvm::iterator_range< helper_expr_iterator > helper_expr_range
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
helper_expr_const_range lhs_exprs() const
helper_expr_const_range reduction_ops() const
helper_expr_const_range privates() const
SourceLocation getColonLoc() const
Gets location of ':' symbol in clause.
helper_expr_const_range taskgroup_descriptors() const
child_range used_children()
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
helper_expr_range reduction_ops()
const_child_range used_children() const
helper_expr_range rhs_exprs()
const_child_range children() const
helper_expr_range lhs_exprs()
helper_expr_range privates()
This represents clause 'inclusive' in the '#pragma omp scan' directive.
const_child_range children() const
static bool classof(const OMPClause *T)
child_range used_children()
static OMPInclusiveClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
const_child_range used_children() const
This represents the 'init' clause in '#pragma omp ...' directives.
bool getIsTarget() const
Returns true is interop-type 'target' is used.
child_range used_children()
const_child_range children() const
const_prefs_range prefs() const
llvm::iterator_range< prefs_iterator > prefs_range
const Expr * getInteropVar() const
static bool classof(const OMPClause *T)
ArrayRef< const Expr * >::iterator const_prefs_iterator
SourceLocation getVarLoc() const
Returns the location of the interop variable.
bool getIsTargetSync() const
Returns true is interop-type 'targetsync' is used.
static OMPInitClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N expressions.
MutableArrayRef< Expr * >::iterator prefs_iterator
const_child_range used_children() const
Expr * getInteropVar()
Returns the interop variable.
llvm::iterator_range< const_prefs_iterator > const_prefs_range
This represents clause 'is_device_ptr' in the '#pragma omp ...' directives.
const_child_range used_children() const
const_child_range children() const
child_range used_children()
static bool classof(const OMPClause *T)
static OMPIsDevicePtrClause * CreateEmpty(const ASTContext &C, const OMPMappableExprListSizeTy &Sizes)
Creates an empty clause with the place for NumVars variables.
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
static OMPLastprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
helper_expr_range assignment_ops()
void setPrivateCopies(ArrayRef< Expr * > PrivateCopies)
Set list of helper expressions, required for generation of private copies of original lastprivate var...
SourceLocation getKindLoc() const
Returns the location of the lastprivate kind.
const_child_range used_children() const
helper_expr_const_range destination_exprs() const
helper_expr_const_range source_exprs() const
helper_expr_range destination_exprs()
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
static bool classof(const OMPClause *T)
helper_expr_range source_exprs()
const_child_range children() const
helper_expr_const_range assignment_ops() const
helper_expr_range private_copies()
MutableArrayRef< Expr * >::iterator helper_expr_iterator
SourceLocation getColonLoc() const
Returns the location of the ':' symbol, if any.
OpenMPLastprivateModifier getKind() const
Lastprivate kind.
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
child_range used_children()
llvm::iterator_range< helper_expr_iterator > helper_expr_range
helper_expr_const_range private_copies() const
This represents clause 'linear' in the '#pragma omp ...' directives.
static bool classof(const OMPClause *T)
void setStepModifierLoc(SourceLocation Loc)
Sets the location of 'step' modifier.
updates_const_range updates() const
child_range used_children()
SourceLocation getModifierLoc() const
Return modifier location.
static OMPLinearClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
Expr * getStep()
Returns linear step.
void setUpdates(ArrayRef< Expr * > UL)
Sets the list of update expressions for linear variables.
privates_range privates()
void setFinals(ArrayRef< Expr * > FL)
Sets the list of final update expressions for linear variables.
privates_const_range privates() const
void setUsedExprs(ArrayRef< Expr * > UE)
Sets the list of used expressions for the linear clause.
const Expr * getStep() const
Returns linear step.
ArrayRef< const Expr * >::iterator used_expressions_const_iterator
llvm::iterator_range< finals_iterator > finals_range
llvm::iterator_range< updates_iterator > updates_range
MutableArrayRef< Expr * >::iterator inits_iterator
ArrayRef< const Expr * >::iterator finals_const_iterator
void setModifierLoc(SourceLocation Loc)
Set modifier location.
MutableArrayRef< Expr * >::iterator used_expressions_iterator
llvm::iterator_range< finals_const_iterator > finals_const_range
llvm::iterator_range< privates_iterator > privates_range
inits_const_range inits() const
const_child_range children() const
Expr * getCalcStep()
Returns expression to calculate linear step.
MutableArrayRef< Expr * >::iterator finals_iterator
llvm::iterator_range< used_expressions_const_iterator > used_expressions_const_range
ArrayRef< const Expr * >::iterator updates_const_iterator
void setColonLoc(SourceLocation Loc)
Sets the location of ':'.
const Expr * getCalcStep() const
Returns expression to calculate linear step.
ArrayRef< const Expr * >::iterator inits_const_iterator
llvm::iterator_range< updates_const_iterator > updates_const_range
SourceLocation getStepModifierLoc() const
Returns the location of 'step' modifier.
used_expressions_const_range used_expressions() const
llvm::iterator_range< used_expressions_iterator > used_expressions_range
used_expressions_range used_expressions()
llvm::iterator_range< privates_const_iterator > privates_const_range
finals_const_range finals() const
const_child_range used_children() const
void setModifier(OpenMPLinearClauseKind Kind)
Set modifier.
llvm::iterator_range< inits_const_iterator > inits_const_range
MutableArrayRef< Expr * >::iterator updates_iterator
llvm::iterator_range< inits_iterator > inits_range
ArrayRef< const Expr * >::iterator privates_const_iterator
OpenMPLinearClauseKind getModifier() const
Return modifier.
SourceLocation getColonLoc() const
Returns the location of ':'.
MutableArrayRef< Expr * >::iterator privates_iterator
This represents clause 'map' in the '#pragma omp ...' directives.
OpenMPMapClauseKind getMapType() const LLVM_READONLY
Fetches mapping kind for the clause.
ArrayRef< SourceLocation > getMapTypeModifiersLoc() const LLVM_READONLY
Fetches ArrayRef of location of map-type-modifiers.
Expr * getIteratorModifier()
Fetches Expr * of iterator modifier.
child_range used_children()
bool isImplicitMapType() const LLVM_READONLY
Is this an implicit map type? We have to capture 'IsMapTypeImplicit' from the parser for more informa...
static bool classof(const OMPClause *T)
SourceLocation getMapTypeModifierLoc(unsigned Cnt) const LLVM_READONLY
Fetches the map-type-modifier location at 'Cnt' index of array of modifiers' locations.
const_child_range children() const
ArrayRef< OpenMPMapModifierKind > getMapTypeModifiers() const LLVM_READONLY
Fetches ArrayRef of map-type-modifiers.
SourceLocation getColonLoc() const
Get colon location.
const_child_range used_children() const
SourceLocation getMapLoc() const LLVM_READONLY
Fetches location of clause mapping kind.
static OMPMapClause * CreateEmpty(const ASTContext &C, const OMPMappableExprListSizeTy &Sizes)
Creates an empty clause with the place for NumVars original expressions, NumUniqueDeclarations declar...
OpenMPMapModifierKind getMapTypeModifier(unsigned Cnt) const LLVM_READONLY
Fetches the map-type-modifier at 'Cnt' index of array of modifiers.
Iterator that browse the components by lists.
const_component_lists_iterator & operator++()
std::tuple< const ValueDecl *, MappableExprComponentListRef, const ValueDecl * > operator->() const
std::tuple< const ValueDecl *, MappableExprComponentListRef, const ValueDecl * > operator*() const
const_component_lists_iterator(ArrayRef< ValueDecl * > UniqueDecls, ArrayRef< unsigned > DeclsListNum, ArrayRef< unsigned > CumulativeListSizes, MappableExprComponentListRef Components, bool SupportsMapper, ArrayRef< Expr * > Mappers)
Construct an iterator that scans all lists.
const_component_lists_iterator(const ValueDecl *Declaration, ArrayRef< ValueDecl * > UniqueDecls, ArrayRef< unsigned > DeclsListNum, ArrayRef< unsigned > CumulativeListSizes, MappableExprComponentListRef Components, bool SupportsMapper, ArrayRef< Expr * > Mappers)
Construct an iterator that scan lists for a given declaration Declaration.
This represents clauses with a list of expressions that are mappable.
const_component_lists_range component_lists() const
ArrayRef< MappableComponent > getComponentsRef() const
Get the components that are in the trailing objects of the class.
OMPMappableExprListClause(OpenMPClauseKind K, const OMPVarListLocTy &Locs, const OMPMappableExprListSizeTy &Sizes, bool SupportsMapper=false, NestedNameSpecifierLoc *MapperQualifierLocPtr=nullptr, DeclarationNameInfo *MapperIdInfoPtr=nullptr)
Build a clause for NumUniqueDeclarations declarations, NumComponentLists total component lists,...
llvm::iterator_range< const_component_lists_iterator > const_component_lists_range
llvm::iterator_range< mapperlist_iterator > mapperlist_range
MutableArrayRef< ValueDecl * > getUniqueDeclsRef()
Get the unique declarations that are in the trailing objects of the class.
MutableArrayRef< MappableComponent > getComponentsRef()
Get the components that are in the trailing objects of the class.
void setUDMapperRefs(ArrayRef< Expr * > DMDs)
Set the user-defined mappers that are in the trailing objects of the class.
ArrayRef< unsigned >::iterator const_all_lists_sizes_iterator
mapperlist_iterator mapperlist_end()
const_all_decls_range all_decls() const
mapperlist_const_range mapperlists() const
void setDeclNumLists(ArrayRef< unsigned > DNLs)
Set the number of lists per declaration that are in the trailing objects of the class.
const_component_lists_iterator decl_component_lists_begin(const ValueDecl *VD) const
Iterators for component lists associated with the provided declaration.
void setMapperQualifierLoc(NestedNameSpecifierLoc NNSL)
Set the nested name specifier of associated user-defined mapper.
unsigned getTotalComponentsNum() const
Return the total number of components in all lists derived from the clause.
MutableArrayRef< unsigned > getComponentListSizesRef()
Get the cumulative component lists sizes that are in the trailing objects of the class.
ArrayRef< Expr * > getUDMapperRefs() const
Get the user-defined mappers references that are in the trailing objects of the class.
unsigned getUniqueDeclarationsNum() const
Return the number of unique base declarations in this clause.
llvm::iterator_range< const_all_lists_sizes_iterator > const_all_lists_sizes_range
ArrayRef< unsigned > getComponentListSizesRef() const
Get the cumulative component lists sizes that are in the trailing objects of the class.
ArrayRef< unsigned > getDeclNumListsRef() const
Get the number of lists per declaration that are in the trailing objects of the class.
const_all_lists_sizes_range all_lists_sizes() const
llvm::iterator_range< const_all_num_lists_iterator > const_all_num_lists_range
void setUniqueDecls(ArrayRef< ValueDecl * > UDs)
Set the unique declarations that are in the trailing objects of the class.
llvm::iterator_range< const_all_decls_iterator > const_all_decls_range
llvm::iterator_range< mapperlist_const_iterator > mapperlist_const_range
const DeclarationNameInfo & getMapperIdInfo() const
Gets the name info for associated user-defined mapper.
const_component_lists_iterator decl_component_lists_end() const
mapperlist_iterator mapperlist_begin()
ArrayRef< unsigned >::iterator const_all_num_lists_iterator
void setComponents(ArrayRef< MappableComponent > Components, ArrayRef< unsigned > CLSs)
Set the components that are in the trailing objects of the class.
MutableArrayRef< Expr * >::iterator mapperlist_iterator
MutableArrayRef< Expr * > getUDMapperRefs()
Get the user-defined mapper references that are in the trailing objects of the class.
mapperlist_const_iterator mapperlist_begin() const
ArrayRef< const Expr * >::iterator mapperlist_const_iterator
const_all_num_lists_range all_num_lists() const
void setClauseInfo(ArrayRef< ValueDecl * > Declarations, MappableExprComponentListsRef ComponentLists)
Fill the clause information from the list of declarations and associated component lists.
unsigned getTotalComponentListNum() const
Return the number of lists derived from the clause expressions.
const_component_lists_range decl_component_lists(const ValueDecl *VD) const
void setComponentListSizes(ArrayRef< unsigned > CLSs)
Set the cumulative component lists sizes that are in the trailing objects of the class.
NestedNameSpecifierLoc getMapperQualifierLoc() const
Gets the nested name specifier for associated user-defined mapper.
ArrayRef< ValueDecl * > getUniqueDeclsRef() const
Get the unique declarations that are in the trailing objects of the class.
mapperlist_range mapperlists()
MutableArrayRef< unsigned > getDeclNumListsRef()
Get the number of lists per declaration that are in the trailing objects of the class.
const_component_lists_iterator component_lists_end() const
const_component_lists_iterator component_lists_begin() const
Iterators for all component lists.
llvm::iterator_range< const_all_components_iterator > const_all_components_range
ArrayRef< MappableComponent >::iterator const_all_components_iterator
mapperlist_const_iterator mapperlist_end() const
const_all_components_range all_components() const
void setMapperIdInfo(DeclarationNameInfo MapperId)
Set the name of associated user-defined mapper.
ArrayRef< ValueDecl * >::iterator const_all_decls_iterator
Iterators to access all the declarations, number of lists, list sizes, and components.
This represents 'mergeable' clause in the '#pragma omp ...' directive.
OMPMergeableClause()
Build an empty clause.
OMPMergeableClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'mergeable' clause.
const_child_range children() const
const_child_range used_children() const
static bool classof(const OMPClause *T)
child_range used_children()
This represents 'message' clause in the '#pragma omp error' directive.
SourceLocation getLParenLoc() const
Returns the locaiton of '('.
Expr * getMessageString() const
Returns message string of the clause.
OMPMessageClause(Expr *MS, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'message' clause with message string argument.
static bool classof(const OMPClause *T)
const_child_range children() const
child_range used_children()
OMPMessageClause()
Build an empty clause.
const_child_range used_children() const
This represents the 'no_openmp' clause in the '#pragma omp assume' directive.
OMPNoOpenMPClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'no_openmp' clause.
OMPNoOpenMPClause()
Build an empty clause.
This represents the 'no_openmp_routines' clause in the '#pragma omp assume' directive.
OMPNoOpenMPRoutinesClause()
Build an empty clause.
OMPNoOpenMPRoutinesClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'no_openmp_routines' clause.
This represents the 'no_parallelism' clause in the '#pragma omp assume' directive.
OMPNoParallelismClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'no_parallelism' clause.
OMPNoParallelismClause()
Build an empty clause.
This represents 'nocontext' clause in the '#pragma omp ...' directive.
OMPNocontextClause(Expr *Cond, Stmt *HelperCond, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'nocontext' clause with condition Cond.
const_child_range used_children() const
OMPNocontextClause()
Build an empty clause.
Expr * getCondition() const
Returns condition.
child_range used_children()
This represents 'nogroup' clause in the '#pragma omp ...' directive.
OMPNogroupClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'nogroup' clause.
static bool classof(const OMPClause *T)
OMPNogroupClause()
Build an empty clause.
const_child_range children() const
child_range used_children()
const_child_range used_children() const
This represents clause 'nontemporal' in the '#pragma omp ...' directives.
static OMPNontemporalClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
const_child_range private_refs() const
static bool classof(const OMPClause *T)
child_range private_refs()
child_range used_children()
void setPrivateRefs(ArrayRef< Expr * > VL)
Sets the list of references to private copies created in private clauses.
const_child_range children() const
const_child_range used_children() const
This represents 'novariants' clause in the '#pragma omp ...' directive.
const_child_range used_children() const
OMPNovariantsClause()
Build an empty clause.
child_range used_children()
OMPNovariantsClause(Expr *Cond, Stmt *HelperCond, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'novariants' clause with condition Cond.
Expr * getCondition() const
Returns condition.
This represents 'nowait' clause in the '#pragma omp ...' directive.
OMPNowaitClause(SourceLocation StartLoc=SourceLocation(), SourceLocation EndLoc=SourceLocation())
Build 'nowait' clause.
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
const_child_range children() const
Expr * getNumTasks() const
Return safe iteration space distance.
SourceLocation getModifierLoc() const
Gets modifier location.
SourceLocation getLParenLoc() const
Returns the location of '('.
OMPNumTasksClause(OpenMPNumTasksClauseModifier Modifier, Expr *Size, Stmt *HelperSize, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
Build 'num_tasks' clause.
static bool classof(const OMPClause *T)
const_child_range used_children() const
OMPNumTasksClause()
Build an empty clause.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
child_range used_children()
OpenMPNumTasksClauseModifier getModifier() const
Gets modifier.
This represents 'num_teams' clause in the '#pragma omp ...' directive.
SourceLocation getLParenLoc() const
Returns the location of '('.
const_child_range children() const
const_child_range used_children() const
static bool classof(const OMPClause *T)
child_range used_children()
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
ArrayRef< Expr * > getNumTeams() const
Return NumTeams expressions.
static OMPNumTeamsClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
ArrayRef< Expr * > getNumTeams()
Return NumTeams expressions.
This represents 'num_threads' clause in the '#pragma omp ...' directive.
OMPNumThreadsClause()
Build an empty clause.
OMPNumThreadsClause(Expr *NumThreads, Stmt *HelperNumThreads, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'num_threads' clause with condition NumThreads.
Expr * getNumThreads() const
Returns number of threads.
const_child_range used_children() const
child_range used_children()
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OMPOneStmtClause(Stmt *S, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
static bool classof(const OMPClause *T)
ConstStmtIterator const_child_iterator
const_child_range children() const
StmtIterator child_iterator
llvm::iterator_range< child_iterator > child_range
SourceLocation getLParenLoc() const
Returns the location of '('.
llvm::iterator_range< const_child_iterator > const_child_range
T * getStmtAs() const
Return the associated statement, potentially casted to T.
This represents 'order' clause in the '#pragma omp ...' directive.
OMPOrderClause(OpenMPOrderClauseKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, OpenMPOrderClauseModifier Modifier, SourceLocation MLoc)
Build 'order' clause with argument A ('concurrent').
SourceLocation getLParenLoc() const
Returns the location of '('.
const_child_range children() const
const_child_range used_children() const
SourceLocation getKindKwLoc() const
Returns location of clause kind.
static bool classof(const OMPClause *T)
SourceLocation getModifierKwLoc() const
Returns location of clause modifier.
OpenMPOrderClauseKind getKind() const
Returns kind of the clause.
child_range used_children()
OMPOrderClause()
Build an empty clause.
OpenMPOrderClauseModifier getModifier() const
Returns Modifier of the clause.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
This represents 'ordered' clause in the '#pragma omp ...' directive.
const_child_range children() const
void setLoopCounter(unsigned NumLoop, Expr *Counter)
Set loop counter for the specified loop.
static bool classof(const OMPClause *T)
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Expr * getNumForLoops() const
Return the number of associated for-loops.
void setLoopNumIterations(unsigned NumLoop, Expr *NumIterations)
Set number of iterations for the specified loop.
SourceLocation getLParenLoc() const
Returns the location of '('.
const_child_range used_children() const
ArrayRef< Expr * > getLoopNumIterations() const
Get number of iterations for all the loops.
child_range used_children()
static OMPOrderedClause * CreateEmpty(const ASTContext &C, unsigned NumLoops)
Build an empty clause.
Expr * getLoopCounter(unsigned NumLoop)
Get loops counter for the specified loop.
Representation of the 'partial' clause of the '#pragma omp unroll' directive.
child_range used_children()
static OMPPartialClause * CreateEmpty(const ASTContext &C)
Build an empty 'partial' AST node for deserialization.
const_child_range used_children() const
SourceLocation getLParenLoc() const
Returns the location of '('.
const_child_range children() const
static bool classof(const OMPClause *T)
Expr * getFactor() const
Returns the argument of the clause or nullptr if not set.
This class represents the 'permutation' clause in the '#pragma omp interchange' directive.
static bool classof(const OMPClause *T)
ArrayRef< Expr * > getArgsRefs() const
unsigned getNumLoops() const
Returns the number of list items.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
SourceLocation getLParenLoc() const
Returns the location of '('.
child_range used_children()
MutableArrayRef< Expr * > getArgsRefs()
Returns the permutation index expressions.
static OMPPermutationClause * CreateEmpty(const ASTContext &C, unsigned NumLoops)
Build an empty 'permutation' AST node for deserialization.
const_child_range used_children() const
const_child_range children() const
This represents 'priority' clause in the '#pragma omp ...' directive.
OMPPriorityClause(Expr *Priority, Stmt *HelperPriority, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'priority' clause.
Expr * getPriority() const
Return Priority number.
const_child_range used_children() const
static bool classof(const OMPClause *T)
const_child_range children() const
child_range used_children()
OMPPriorityClause()
Build an empty clause.
SourceLocation getLParenLoc() const
Returns the location of '('.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Expr * getPriority()
Return Priority number.
This represents clause 'private' in the '#pragma omp ...' directives.
const_child_range children() const
private_copies_range private_copies()
static bool classof(const OMPClause *T)
const_child_range used_children() const
child_range used_children()
llvm::iterator_range< private_copies_iterator > private_copies_range
ArrayRef< const Expr * >::iterator private_copies_const_iterator
private_copies_const_range private_copies() const
llvm::iterator_range< private_copies_const_iterator > private_copies_const_range
MutableArrayRef< Expr * >::iterator private_copies_iterator
static OMPPrivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
child_range used_children()
const_child_range used_children() const
SourceLocation getProcBindKindKwLoc() const
Returns location of clause kind.
const_child_range children() const
SourceLocation getLParenLoc() const
Returns the location of '('.
OMPProcBindClause()
Build an empty clause.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OMPProcBindClause(llvm::omp::ProcBindKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'proc_bind' clause with argument A ('master', 'close' or 'spread').
llvm::omp::ProcBindKind getProcBindKind() const
Returns kind of the clause.
static bool classof(const OMPClause *T)
This represents 'read' clause in the '#pragma omp atomic' directive.
static bool classof(const OMPClause *T)
child_range used_children()
const_child_range children() const
const_child_range used_children() const
OMPReadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'read' clause.
OMPReadClause()
Build an empty clause.
This represents clause 'reduction' in the '#pragma omp ...' directives.
child_range used_children()
MutableArrayRef< Expr * >::iterator helper_expr_iterator
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
helper_expr_const_range rhs_exprs() const
llvm::iterator_range< helper_expr_iterator > helper_expr_range
helper_expr_const_range lhs_exprs() const
helper_expr_range copy_array_temps()
static OMPReductionClause * CreateEmpty(const ASTContext &C, unsigned N, OpenMPReductionClauseModifier Modifier)
Creates an empty clause with the place for N variables.
helper_expr_range rhs_exprs()
helper_expr_range copy_array_elems()
helper_expr_range lhs_exprs()
helper_expr_const_range copy_array_temps() const
const_child_range used_children() const
helper_expr_const_range reduction_ops() const
helper_expr_range privates()
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
helper_expr_const_range privates() const
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
static bool classof(const OMPClause *T)
helper_expr_const_range copy_array_elems() const
helper_expr_const_range copy_ops() const
OpenMPReductionClauseModifier getModifier() const
Returns modifier.
SourceLocation getModifierLoc() const
Returns modifier location.
helper_expr_range copy_ops()
const_child_range children() const
SourceLocation getColonLoc() const
Gets location of ':' symbol in clause.
helper_expr_range reduction_ops()
This represents 'relaxed' clause in the '#pragma omp atomic' directives.
static bool classof(const OMPClause *T)
const_child_range used_children() const
child_range used_children()
OMPRelaxedClause()
Build an empty clause.
const_child_range children() const
OMPRelaxedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'relaxed' clause.
This represents 'release' clause in the '#pragma omp atomic|flush' directives.
const_child_range children() const
child_range used_children()
OMPReleaseClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'release' clause.
OMPReleaseClause()
Build an empty clause.
static bool classof(const OMPClause *T)
const_child_range used_children() const
This represents 'reverse_offload' clause in the '#pragma omp requires' directive.
const_child_range children() const
const_child_range used_children() const
OMPReverseOffloadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'reverse_offload' clause.
static bool classof(const OMPClause *T)
OMPReverseOffloadClause()
Build an empty clause.
child_range used_children()
This represents 'simd' clause in the '#pragma omp ...' directive.
OMPSIMDClause()
Build an empty clause.
const_child_range children() const
const_child_range used_children() const
child_range used_children()
static bool classof(const OMPClause *T)
OMPSIMDClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'simd' clause.
This represents 'safelen' clause in the '#pragma omp ...' directive.
OMPSafelenClause(Expr *Len, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'safelen' clause.
Expr * getSafelen() const
Return safe iteration space distance.
OMPSafelenClause()
Build an empty clause.
This represents 'schedule' clause in the '#pragma omp ...' directive.
static bool classof(const OMPClause *T)
SourceLocation getFirstScheduleModifierLoc() const
Get the first modifier location.
OMPScheduleClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KLoc, SourceLocation CommaLoc, SourceLocation EndLoc, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, Stmt *HelperChunkSize, OpenMPScheduleClauseModifier M1, SourceLocation M1Loc, OpenMPScheduleClauseModifier M2, SourceLocation M2Loc)
Build 'schedule' clause with schedule kind Kind and chunk size expression ChunkSize.
SourceLocation getScheduleKindLoc()
Get kind location.
OpenMPScheduleClauseKind getScheduleKind() const
Get kind of the clause.
SourceLocation getLParenLoc()
Get location of '('.
const Expr * getChunkSize() const
Get chunk size.
OMPScheduleClause()
Build an empty clause.
OpenMPScheduleClauseModifier getSecondScheduleModifier() const
Get the second modifier of the clause.
SourceLocation getCommaLoc()
Get location of ','.
OpenMPScheduleClauseModifier getFirstScheduleModifier() const
Get the first modifier of the clause.
child_range used_children()
SourceLocation getSecondScheduleModifierLoc() const
Get the second modifier location.
const_child_range children() const
const_child_range used_children() const
Expr * getChunkSize()
Get chunk size.
This represents 'seq_cst' clause in the '#pragma omp atomic|flush' directives.
OMPSeqCstClause()
Build an empty clause.
const_child_range used_children() const
OMPSeqCstClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'seq_cst' clause.
child_range used_children()
const_child_range children() const
static bool classof(const OMPClause *T)
This represents 'severity' clause in the '#pragma omp error' directive.
child_range used_children()
SourceLocation getLParenLoc() const
Returns the locaiton of '('.
const_child_range children() const
static bool classof(const OMPClause *T)
OMPSeverityClause()
Build an empty clause.
OMPSeverityClause(OpenMPSeverityClauseKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'severity' clause with argument A ('fatal' or 'warning').
OpenMPSeverityClauseKind getSeverityKind() const
Returns kind of the clause.
const_child_range used_children() const
SourceLocation getSeverityKindKwLoc() const
Returns location of clause kind.
This represents 'simdlen' clause in the '#pragma omp ...' directive.
OMPSimdlenClause(Expr *Len, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'simdlen' clause.
Expr * getSimdlen() const
Return safe iteration space distance.
OMPSimdlenClause()
Build an empty clause.
This represents the 'sizes' clause in the '#pragma omp tile' directive.
SourceLocation getLParenLoc() const
Returns the location of '('.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
static bool classof(const OMPClause *T)
const_child_range used_children() const
void setSizesRefs(ArrayRef< Expr * > VL)
Sets the tile size expressions.
unsigned getNumSizes() const
Returns the number of list items.
child_range used_children()
MutableArrayRef< Expr * > getSizesRefs()
Returns the tile size expressions.
ArrayRef< Expr * > getSizesRefs() const
const_child_range children() const
static OMPSizesClause * CreateEmpty(const ASTContext &C, unsigned NumSizes)
Build an empty 'sizes' AST node for deserialization.
This represents clause 'task_reduction' in the '#pragma omp taskgroup' directives.
helper_expr_const_range rhs_exprs() const
llvm::iterator_range< helper_expr_iterator > helper_expr_range
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
llvm::iterator_range< helper_expr_const_iterator > helper_expr_const_range
helper_expr_const_range lhs_exprs() const
const_child_range used_children() const
helper_expr_const_range reduction_ops() const
helper_expr_range privates()
const_child_range children() const
SourceLocation getColonLoc() const
Gets location of ':' symbol in clause.
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
ArrayRef< const Expr * >::iterator helper_expr_const_iterator
MutableArrayRef< Expr * >::iterator helper_expr_iterator
helper_expr_range rhs_exprs()
helper_expr_range lhs_exprs()
helper_expr_range reduction_ops()
helper_expr_const_range privates() const
static OMPTaskReductionClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
static bool classof(const OMPClause *T)
child_range used_children()
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
ArrayRef< Expr * > getThreadLimit()
Return ThreadLimit expressions.
const_child_range children() const
ArrayRef< Expr * > getThreadLimit() const
Return ThreadLimit expressions.
SourceLocation getLParenLoc() const
Returns the location of '('.
static OMPThreadLimitClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
child_range used_children()
const_child_range used_children() const
static bool classof(const OMPClause *T)
This represents 'threads' clause in the '#pragma omp ...' directive.
OMPThreadsClause()
Build an empty clause.
OMPThreadsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'threads' clause.
This represents clause 'to' in the '#pragma omp ...' directives.
static OMPToClause * CreateEmpty(const ASTContext &C, const OMPMappableExprListSizeTy &Sizes)
Creates an empty clause with the place for NumVars variables.
const_child_range used_children() const
SourceLocation getMotionModifierLoc(unsigned Cnt) const LLVM_READONLY
Fetches the motion-modifier location at 'Cnt' index of array of modifiers' locations.
ArrayRef< OpenMPMotionModifierKind > getMotionModifiers() const LLVM_READONLY
Fetches ArrayRef of motion-modifiers.
ArrayRef< SourceLocation > getMotionModifiersLoc() const LLVM_READONLY
Fetches ArrayRef of location of motion-modifiers.
const_child_range children() const
SourceLocation getColonLoc() const
Get colon location.
static bool classof(const OMPClause *T)
child_range used_children()
OpenMPMotionModifierKind getMotionModifier(unsigned Cnt) const LLVM_READONLY
Fetches the motion-modifier at 'Cnt' index of array of modifiers.
Helper data structure representing the traits in a match clause of an declare variant or metadirectiv...
bool isExtensionActive(llvm::omp::TraitProperty TP)
Check the extension trait TP is active.
bool anyScoreOrCondition(llvm::function_ref< bool(Expr *&, bool)> Cond)
std::string getMangledName() const
Return a string representation identifying this context selector.
void print(llvm::raw_ostream &OS, const PrintingPolicy &Policy) const
Print a human readable representation into OS.
void getAsVariantMatchInfo(ASTContext &ASTCtx, llvm::omp::VariantMatchInfo &VMI) const
Create a variant match info object from this trait info object.
llvm::SmallVector< OMPTraitSet, 2 > Sets
The outermost level of selector sets.
This represents 'unified_address' clause in the '#pragma omp requires' directive.
OMPUnifiedAddressClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'unified_address' clause.
OMPUnifiedAddressClause()
Build an empty clause.
This represents 'untied' clause in the '#pragma omp ...' directive.
child_range used_children()
OMPUntiedClause()
Build an empty clause.
OMPUntiedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'untied' clause.
static bool classof(const OMPClause *T)
const_child_range used_children() const
const_child_range children() const
This represents 'update' clause in the '#pragma omp atomic' directive.
const_child_range used_children() const
const_child_range children() const
OpenMPDependClauseKind getDependencyKind() const
Gets the dependence kind in clause for 'depobj' directive.
static OMPUpdateClause * CreateEmpty(const ASTContext &C, bool IsExtended)
Creates an empty clause with the place for N variables.
child_range used_children()
static bool classof(const OMPClause *T)
SourceLocation getLParenLoc() const
Gets the location of '(' in clause for 'depobj' directive.
SourceLocation getArgumentLoc() const
Gets the location of argument in clause for 'depobj' directive.
bool isExtended() const
Checks if the clause is the extended clauses for 'depobj' directive.
This represents the 'use' clause in '#pragma omp ...' directives.
child_range used_children()
SourceLocation getVarLoc() const
Returns the location of the interop variable.
OMPUseClause()
Build an empty clause.
const_child_range used_children() const
const_child_range children() const
OMPUseClause(Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Build 'use' clause with and interop variable expression InteropVar.
static bool classof(const OMPClause *T)
SourceLocation getLParenLoc() const
Returns the location of '('.
Expr * getInteropVar() const
Returns the interop variable.
This represents clause 'use_device_addr' in the '#pragma omp ...' directives.
const_child_range used_children() const
static bool classof(const OMPClause *T)
child_range used_children()
const_child_range children() const
static OMPUseDeviceAddrClause * CreateEmpty(const ASTContext &C, const OMPMappableExprListSizeTy &Sizes)
Creates an empty clause with the place for NumVars variables.
This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.
ArrayRef< const Expr * >::iterator private_copies_const_iterator
private_copies_const_range private_copies() const
llvm::iterator_range< private_copies_const_iterator > private_copies_const_range
const_child_range used_children() const
const_child_range children() const
llvm::iterator_range< inits_iterator > inits_range
MutableArrayRef< Expr * >::iterator inits_iterator
inits_const_range inits() const
static OMPUseDevicePtrClause * CreateEmpty(const ASTContext &C, const OMPMappableExprListSizeTy &Sizes)
Creates an empty clause with the place for NumVars variables.
child_range used_children()
ArrayRef< const Expr * >::iterator inits_const_iterator
static bool classof(const OMPClause *T)
MutableArrayRef< Expr * >::iterator private_copies_iterator
private_copies_range private_copies()
llvm::iterator_range< inits_const_iterator > inits_const_range
llvm::iterator_range< private_copies_iterator > private_copies_range
This represents clause 'uses_allocators' in the '#pragma omp target'-based directives.
static bool classof(const OMPClause *T)
SourceLocation getLParenLoc() const
Returns the location of '('.
child_range used_children()
const_child_range children() const
OMPUsesAllocatorsClause::Data getAllocatorData(unsigned I) const
Returns data for the specified allocator.
static OMPUsesAllocatorsClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N allocators.
unsigned getNumberOfAllocators() const
Returns number of allocators associated with the clause.
const_child_range used_children() const
This represents clauses with the list of variables like 'private', 'firstprivate',...
varlist_const_range varlist() const
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
ArrayRef< const Expr * > getVarRefs() const
Fetches list of all variables in the clause.
OMPVarListClause(OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, unsigned N)
Build a clause with N variables.
MutableArrayRef< Expr * > getVarRefs()
Fetches list of variables associated with this clause.
varlist_const_iterator varlist_end() const
varlist_iterator varlist_end()
llvm::iterator_range< varlist_const_iterator > varlist_const_range
MutableArrayRef< Expr * >::iterator varlist_iterator
varlist_iterator varlist_begin()
ArrayRef< const Expr * >::iterator varlist_const_iterator
SourceLocation getLParenLoc() const
Returns the location of '('.
bool varlist_empty() const
unsigned varlist_size() const
varlist_const_iterator varlist_begin() const
llvm::iterator_range< varlist_iterator > varlist_range
void setVarRefs(ArrayRef< Expr * > VL)
Sets the list of variables for this clause.
This represents 'weak' clause in the '#pragma omp atomic' directives.
const_child_range used_children() const
OMPWeakClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'weak' clause.
static bool classof(const OMPClause *T)
child_range used_children()
OMPWeakClause()
Build an empty clause.
const_child_range children() const
This represents 'write' clause in the '#pragma omp atomic' directive.
OMPWriteClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'write' clause.
const_child_range used_children() const
child_range used_children()
static bool classof(const OMPClause *T)
const_child_range children() const
OMPWriteClause()
Build an empty clause.
This represents 'ompx_attribute' clause in a directive that might generate an outlined function.
ArrayRef< const Attr * > getAttrs() const
Returned the attributes parsed from this clause.
OMPXAttributeClause()
Build an empty clause.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
SourceLocation getLParenLoc() const
Returns the location of '('.
OMPXAttributeClause(ArrayRef< const Attr * > Attrs, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'ompx_attribute' clause.
This represents 'ompx_bare' clause in the '#pragma omp target teams ...' directive.
OMPXBareClause()=default
Build an empty clause.
OMPXBareClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'ompx_bare' clause.
This represents 'ompx_dyn_cgroup_mem' clause in the '#pragma omp target ...' directive.
OMPXDynCGroupMemClause(Expr *Size, Stmt *HelperSize, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Build 'ompx_dyn_cgroup_mem' clause.
Expr * getSize()
Return the size expression.
Expr * getSize() const
Return the size expression.
OMPXDynCGroupMemClause()
Build an empty clause.
Smart pointer class that efficiently represents Objective-C method names.
Encodes a location in the source.
Stmt - This represents one statement.
llvm::iterator_range< child_iterator > child_range
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
The JSON file list parser is used to communicate input to InstallAPI.
bool checkFailClauseParameter(OpenMPClauseKind FailClauseParameter)
Checks if the parameter to the fail clause in "#pragma atomic compare fail" is restricted only to mem...
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
OpenMPDefaultmapClauseModifier
OpenMP modifiers for 'defaultmap' clause.
@ OMPC_DEFAULTMAP_MODIFIER_unknown
OpenMPOrderClauseModifier
OpenMP modifiers for 'order' clause.
@ OMPC_ORDER_MODIFIER_unknown
std::add_pointer_t< std::add_const_t< T > > const_ptr
OpenMPAtClauseKind
OpenMP attributes for 'at' clause.
OpenMPReductionClauseModifier
OpenMP modifiers for 'reduction' clause.
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
OpenMPScheduleClauseModifier
OpenMP modifiers for 'schedule' clause.
@ OMPC_SCHEDULE_MODIFIER_unknown
llvm::omp::Clause OpenMPClauseKind
OpenMP clauses.
OpenMPDistScheduleClauseKind
OpenMP attributes for 'dist_schedule' clause.
@ OMPC_DIST_SCHEDULE_unknown
OpenMPDoacrossClauseModifier
OpenMP dependence types for 'doacross' clause.
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section)
Insertion operator for diagnostics.
static constexpr unsigned NumberOfOMPMapClauseModifiers
Number of allowed map-type-modifiers.
@ Property
The type of a property.
OpenMPBindClauseKind
OpenMP bindings for the 'bind' clause.
OpenMPLastprivateModifier
OpenMP 'lastprivate' clause modifier.
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
OpenMPGrainsizeClauseModifier
OpenMPNumTasksClauseModifier
OpenMPSeverityClauseKind
OpenMP attributes for 'severity' clause.
static constexpr unsigned NumberOfOMPMotionModifiers
Number of allowed motion-modifiers.
OpenMPMotionModifierKind
OpenMP modifier kind for 'to' or 'from' clause.
@ OMPC_MOTION_MODIFIER_unknown
OpenMPDefaultmapClauseKind
OpenMP attributes for 'defaultmap' clause.
@ OMPC_DEFAULTMAP_unknown
OpenMPAllocateClauseModifier
OpenMP modifiers for 'allocate' clause.
OpenMPLinearClauseKind
OpenMP attributes for 'linear' clause.
const FunctionProtoType * T
OpenMPAtomicDefaultMemOrderClauseKind
OpenMP attributes for 'atomic_default_mem_order' clause.
@ OMPC_ATOMIC_DEFAULT_MEM_ORDER_unknown
U cast(CodeGen::Address addr)
OpenMPDeviceClauseModifier
OpenMP modifiers for 'device' clause.
OpenMPMapModifierKind
OpenMP modifier kind for 'map' clause.
@ OMPC_MAP_MODIFIER_unknown
OpenMPOrderClauseKind
OpenMP attributes for 'order' clause.
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
OpenMPMapClauseKind
OpenMP mapping kind for 'map' clause.
Diagnostic wrappers for TextAPI types for error reporting.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
SourceLocation OmpAllMemoryLoc
Location of 'omp_all_memory'.
SourceLocation ColonLoc
Colon location.
OpenMPDependClauseKind DepKind
Dependency type (one of in, out, inout).
SourceLocation DepLoc
Dependency type location.
This structure contains all sizes needed for by an OMPMappableExprListClause.
unsigned NumComponentLists
Number of component lists.
OMPMappableExprListSizeTy(unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
unsigned NumVars
Number of expressions listed.
OMPMappableExprListSizeTy()=default
unsigned NumUniqueDeclarations
Number of unique base declarations.
unsigned NumComponents
Total number of expression components.
const_child_range used_children() const
static bool classof(const OMPClause *T)
OMPNoChildClause(SourceLocation StartLoc, SourceLocation EndLoc)
Build 'ClauseKind' clause.
child_range used_children()
OMPNoChildClause()
Build an empty clause.
const_child_range children() const
llvm::omp::TraitProperty Kind
StringRef RawString
The raw string as we parsed it.
llvm::omp::TraitSelector Kind
llvm::SmallVector< OMPTraitProperty, 1 > Properties
llvm::SmallVector< OMPTraitSelector, 2 > Selectors
Data for list of allocators.
SourceLocation LParenLoc
Locations of '(' and ')' symbols.
Expr * AllocatorTraits
Allocator traits.
Expr * Allocator
Allocator.
This structure contains most locations needed for by an OMPVarListClause.
SourceLocation StartLoc
Starting location of the clause (the clause keyword).
SourceLocation LParenLoc
Location of '('.
SourceLocation EndLoc
Ending location of the clause.
OMPVarListLocTy()=default
OMPVarListLocTy(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Describes how types, statements, expressions, and declarations should be printed.
Clang specific specialization of the OMPContext to lookup target features.
bool matchesISATrait(StringRef RawString) const override
See llvm::omp::OMPContext::matchesISATrait.
virtual ~TargetOMPContext()=default
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4