21 #include "llvm/ADT/SmallString.h" 22 using namespace clang;
31 llvm::BitstreamCursor &DeclsCursor;
41 std::string ReadString() {
69 : Record(Record), DeclsCursor(Cursor) {}
73 static const unsigned NumStmtFields = 0;
77 static const unsigned NumExprFields = NumStmtFields + 7;
82 unsigned NumTemplateArgs);
85 unsigned NumTemplateArgs);
87 void VisitStmt(
Stmt *S);
88 #define STMT(Type, Base) \ 89 void Visit##Type(Type *); 90 #include "clang/AST/StmtNodes.inc" 96 unsigned NumTemplateArgs) {
101 for (
unsigned i = 0; i != NumTemplateArgs; ++i)
107 assert(Record.
getIdx() == NumStmtFields &&
"Incorrect statement field count");
110 void ASTStmtReader::VisitNullStmt(
NullStmt *S) {
113 S->HasLeadingEmptyMacro = Record.
readInt();
116 void ASTStmtReader::VisitCompoundStmt(
CompoundStmt *S) {
119 unsigned NumStmts = Record.
readInt();
123 S->LBraceLoc = ReadSourceLocation();
124 S->RBraceLoc = ReadSourceLocation();
127 void ASTStmtReader::VisitSwitchCase(
SwitchCase *S) {
134 void ASTStmtReader::VisitCaseStmt(
CaseStmt *S) {
142 void ASTStmtReader::VisitDefaultStmt(
DefaultStmt *S) {
147 void ASTStmtReader::VisitLabelStmt(
LabelStmt *S) {
158 uint64_t NumAttrs = Record.
readInt();
162 assert(NumAttrs == S->NumAttrs);
163 assert(NumAttrs == Attrs.size());
164 std::copy(Attrs.begin(), Attrs.end(), S->getAttrArrayPtr());
166 S->AttrLoc = ReadSourceLocation();
169 void ASTStmtReader::VisitIfStmt(
IfStmt *S) {
181 void ASTStmtReader::VisitSwitchStmt(
SwitchStmt *S) {
192 for (
auto E = Record.
size(); Record.
getIdx() != E; ) {
203 void ASTStmtReader::VisitWhileStmt(
WhileStmt *S) {
212 void ASTStmtReader::VisitDoStmt(
DoStmt *S) {
221 void ASTStmtReader::VisitForStmt(
ForStmt *S) {
233 void ASTStmtReader::VisitGotoStmt(
GotoStmt *S) {
235 S->
setLabel(ReadDeclAs<LabelDecl>());
247 void ASTStmtReader::VisitContinueStmt(
ContinueStmt *S) {
252 void ASTStmtReader::VisitBreakStmt(
BreakStmt *S) {
257 void ASTStmtReader::VisitReturnStmt(
ReturnStmt *S) {
264 void ASTStmtReader::VisitDeclStmt(
DeclStmt *S) {
276 for (
int I = 0; I < N; ++I)
277 Decls.push_back(ReadDecl());
284 void ASTStmtReader::VisitAsmStmt(
AsmStmt *S) {
294 void ASTStmtReader::VisitGCCAsmStmt(
GCCAsmStmt *S) {
307 for (
unsigned I = 0, N = NumOutputs + NumInputs; I != N; ++I) {
309 Constraints.push_back(cast_or_null<StringLiteral>(Record.
readSubStmt()));
315 for (
unsigned I = 0; I != NumClobbers; ++I)
316 Clobbers.push_back(cast_or_null<StringLiteral>(Record.
readSubStmt()));
318 S->setOutputsAndInputsAndClobbers(Record.
getContext(),
319 Names.data(), Constraints.data(),
320 Exprs.data(), NumOutputs, NumInputs,
321 Clobbers.data(), NumClobbers);
324 void ASTStmtReader::VisitMSAsmStmt(
MSAsmStmt *S) {
326 S->LBraceLoc = ReadSourceLocation();
327 S->EndLoc = ReadSourceLocation();
328 S->NumAsmToks = Record.
readInt();
329 std::string AsmStr = ReadString();
333 AsmToks.reserve(S->NumAsmToks);
334 for (
unsigned i = 0, e = S->NumAsmToks; i != e; ++i) {
346 for (
unsigned i = 0, e = S->
NumClobbers; i != e; ++i) {
347 ClobbersData.push_back(ReadString());
348 Clobbers.push_back(ClobbersData.back());
356 Exprs.reserve(NumOperands);
357 ConstraintsData.reserve(NumOperands);
358 Constraints.reserve(NumOperands);
359 for (
unsigned i = 0; i != NumOperands; ++i) {
361 ConstraintsData.push_back(ReadString());
362 Constraints.push_back(ConstraintsData.back());
365 S->initialize(Record.
getContext(), AsmStr, AsmToks,
366 Constraints, Exprs, Clobbers);
371 assert(Record.
peekInt() == S->NumParams);
373 auto *StoredStmts = S->getStoredStmts();
375 i < CoroutineBodyStmt::SubStmt::FirstParamMove + S->NumParams; ++i)
379 void ASTStmtReader::VisitCoreturnStmt(
CoreturnStmt *S) {
382 for (
auto &SubStmt: S->SubStmts)
384 S->IsImplicit = Record.
readInt() != 0;
387 void ASTStmtReader::VisitCoawaitExpr(
CoawaitExpr *E) {
389 E->KeywordLoc = ReadSourceLocation();
390 for (
auto &SubExpr: E->SubExprs)
392 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.
readSubStmt());
396 void ASTStmtReader::VisitCoyieldExpr(
CoyieldExpr *E) {
398 E->KeywordLoc = ReadSourceLocation();
399 for (
auto &SubExpr: E->SubExprs)
401 E->OpaqueValue = cast_or_null<OpaqueValueExpr>(Record.
readSubStmt());
406 E->KeywordLoc = ReadSourceLocation();
407 for (
auto &SubExpr: E->SubExprs)
411 void ASTStmtReader::VisitCapturedStmt(
CapturedStmt *S) {
430 I.VarAndKind.setPointer(ReadDeclAs<VarDecl>());
432 static_cast<CapturedStmt::VariableCaptureKind>(Record.
readInt()));
433 I.Loc = ReadSourceLocation();
437 void ASTStmtReader::VisitExpr(
Expr *E) {
446 assert(Record.
getIdx() == NumExprFields &&
447 "Incorrect expression field count");
454 E->FnName = cast_or_null<StringLiteral>(Record.
readSubExpr());
457 void ASTStmtReader::VisitDeclRefExpr(
DeclRefExpr *E) {
465 unsigned NumTemplateArgs = 0;
467 NumTemplateArgs = Record.
readInt();
473 if (E->hasFoundDecl())
474 *E->getTrailingObjects<
NamedDecl *>() = ReadDeclAs<NamedDecl>();
477 ReadTemplateKWAndArgsInfo(
481 E->
setDecl(ReadDeclAs<ValueDecl>());
507 unsigned Len = Record.
readInt();
509 "Wrong number of concatenated tokens!");
513 bool isPascal = Record.
readInt();
530 E->
setKind(static_cast<CharacterLiteral::CharacterKind>(Record.
readInt()));
533 void ASTStmtReader::VisitParenExpr(
ParenExpr *E) {
542 unsigned NumExprs = Record.
readInt();
544 for (
unsigned i = 0; i != NumExprs; ++i)
546 E->NumExprs = NumExprs;
547 E->LParenLoc = ReadSourceLocation();
548 E->RParenLoc = ReadSourceLocation();
558 void ASTStmtReader::VisitOffsetOfExpr(
OffsetOfExpr *E) {
629 void ASTStmtReader::VisitCallExpr(
CallExpr *E) {
634 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
642 void ASTStmtReader::VisitMemberExpr(
MemberExpr *E) {
645 "It's a subclass, we must advance Idx!");
648 void ASTStmtReader::VisitObjCIsaExpr(
ObjCIsaExpr *E) {
660 E->setShouldCopy(Record.
readInt());
664 VisitExplicitCastExpr(E);
665 E->LParenLoc = ReadSourceLocation();
666 E->BridgeKeywordLoc = ReadSourceLocation();
670 void ASTStmtReader::VisitCastExpr(
CastExpr *E) {
672 unsigned NumBaseSpecs = Record.
readInt();
677 while (NumBaseSpecs--) {
694 VisitBinaryOperator(E);
701 E->SubExprs[ConditionalOperator::COND] = Record.
readSubExpr();
702 E->SubExprs[ConditionalOperator::LHS] = Record.
readSubExpr();
703 E->SubExprs[ConditionalOperator::RHS] = Record.
readSubExpr();
704 E->QuestionLoc = ReadSourceLocation();
705 E->ColonLoc = ReadSourceLocation();
711 E->OpaqueValue = cast<OpaqueValueExpr>(Record.
readSubExpr());
712 E->SubExprs[BinaryConditionalOperator::COMMON] = Record.
readSubExpr();
713 E->SubExprs[BinaryConditionalOperator::COND] = Record.
readSubExpr();
714 E->SubExprs[BinaryConditionalOperator::LHS] = Record.
readSubExpr();
715 E->SubExprs[BinaryConditionalOperator::RHS] = Record.
readSubExpr();
716 E->QuestionLoc = ReadSourceLocation();
717 E->ColonLoc = ReadSourceLocation();
730 VisitExplicitCastExpr(E);
750 void ASTStmtReader::VisitInitListExpr(
InitListExpr *E) {
756 bool isArrayFiller = Record.
readInt();
757 Expr *filler =
nullptr;
760 E->ArrayFillerOrUnionFieldInit = filler;
762 E->ArrayFillerOrUnionFieldInit = ReadDeclAs<FieldDecl>();
764 unsigned NumInits = Record.
readInt();
767 for (
unsigned I = 0; I != NumInits; ++I) {
772 for (
unsigned I = 0; I != NumInits; ++I)
781 unsigned NumSubExprs = Record.
readInt();
782 assert(NumSubExprs == E->
getNumSubExprs() &&
"Wrong number of subexprs");
783 for (
unsigned I = 0; I != NumSubExprs; ++I)
792 FieldDecl *Field = ReadDeclAs<FieldDecl>();
795 Designators.push_back(Designator(Field->
getIdentifier(), DotLoc,
797 Designators.back().setField(Field);
805 Designators.push_back(Designator(Name, DotLoc, FieldLoc));
810 unsigned Index = Record.
readInt();
813 Designators.push_back(Designator(Index, LBracketLoc, RBracketLoc));
818 unsigned Index = Record.
readInt();
822 Designators.push_back(Designator(Index, LBracketLoc, EllipsisLoc,
829 Designators.data(), Designators.size());
838 void ASTStmtReader::VisitNoInitExpr(
NoInitExpr *E) {
856 void ASTStmtReader::VisitVAArgExpr(
VAArgExpr *E) {
869 E->
setLabel(ReadDeclAs<LabelDecl>());
872 void ASTStmtReader::VisitStmtExpr(
StmtExpr *E) {
879 void ASTStmtReader::VisitChooseExpr(
ChooseExpr *E) {
889 void ASTStmtReader::VisitGNUNullExpr(
GNUNullExpr *E) {
897 unsigned NumExprs = Record.
readInt();
907 E->BuiltinLoc = ReadSourceLocation();
908 E->RParenLoc = ReadSourceLocation();
909 E->TInfo = GetTypeSourceInfo();
913 void ASTStmtReader::VisitBlockExpr(
BlockExpr *E) {
920 E->NumAssocs = Record.
readInt();
923 new(Record.
getContext())
Stmt*[GenericSelectionExpr::END_EXPR+E->NumAssocs];
925 E->SubExprs[GenericSelectionExpr::CONTROLLING] = Record.
readSubExpr();
926 for (
unsigned I = 0, N = E->
getNumAssocs(); I != N; ++I) {
927 E->AssocTypes[I] = GetTypeSourceInfo();
928 E->SubExprs[GenericSelectionExpr::END_EXPR+I] = Record.
readSubExpr();
930 E->ResultIndex = Record.
readInt();
932 E->GenericLoc = ReadSourceLocation();
933 E->DefaultLoc = ReadSourceLocation();
934 E->RParenLoc = ReadSourceLocation();
939 unsigned numSemanticExprs = Record.
readInt();
947 for (
unsigned i = 0; i != numSemanticExprs; ++i) {
949 E->getSubExprsBuffer()[i+1] = subExpr;
953 void ASTStmtReader::VisitAtomicExpr(
AtomicExpr *E) {
957 for (
unsigned I = 0; I != E->NumSubExprs; ++I)
959 E->BuiltinLoc = ReadSourceLocation();
960 E->RParenLoc = ReadSourceLocation();
976 E->BoxingMethod = ReadDeclAs<ObjCMethodDecl>();
977 E->Range = ReadSourceRange();
982 unsigned NumElements = Record.
readInt();
983 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
985 for (
unsigned I = 0, N = NumElements; I != N; ++I)
987 E->ArrayWithObjectsMethod = ReadDeclAs<ObjCMethodDecl>();
988 E->Range = ReadSourceRange();
993 unsigned NumElements = Record.
readInt();
994 assert(NumElements == E->
getNumElements() &&
"Wrong number of elements");
995 bool HasPackExpansions = Record.
readInt();
996 assert(HasPackExpansions == E->HasPackExpansions &&
"Pack expansion mismatch");
1001 for (
unsigned I = 0; I != NumElements; ++I) {
1004 if (HasPackExpansions) {
1005 Expansions[I].EllipsisLoc = ReadSourceLocation();
1006 Expansions[I].NumExpansionsPlusOne = Record.
readInt();
1009 E->DictWithObjectsMethod = ReadDeclAs<ObjCMethodDecl>();
1010 E->Range = ReadSourceRange();
1031 E->ProtoLoc = ReadSourceLocation();
1037 E->
setDecl(ReadDeclAs<ObjCIvarDecl>());
1047 unsigned MethodRefFlags = Record.
readInt();
1048 bool Implicit = Record.
readInt() != 0;
1052 E->setImplicitProperty(Getter, Setter, MethodRefFlags);
1054 E->setExplicitProperty(ReadDeclAs<ObjCPropertyDecl>(), MethodRefFlags);
1056 E->setLocation(ReadSourceLocation());
1057 E->setReceiverLocation(ReadSourceLocation());
1063 E->setSuperReceiver(Record.
readType());
1066 E->setClassReceiver(ReadDeclAs<ObjCInterfaceDecl>());
1076 E->GetAtIndexMethodDecl = ReadDeclAs<ObjCMethodDecl>();
1077 E->SetAtIndexMethodDecl = ReadDeclAs<ObjCMethodDecl>();
1084 unsigned NumStoredSelLocs = Record.
readInt();
1085 E->SelLocsKind = Record.
readInt();
1087 E->IsImplicit = Record.
readInt();
1115 E->LBracLoc = ReadSourceLocation();
1116 E->RBracLoc = ReadSourceLocation();
1118 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
1122 for (
unsigned I = 0; I != NumStoredSelLocs; ++I)
1123 Locs[I] = ReadSourceLocation();
1159 bool HasFinally = Record.
readInt();
1200 void ASTStmtReader::VisitCXXCatchStmt(
CXXCatchStmt *S) {
1202 S->CatchLoc = ReadSourceLocation();
1203 S->ExceptionDecl = ReadDeclAs<VarDecl>();
1207 void ASTStmtReader::VisitCXXTryStmt(
CXXTryStmt *S) {
1211 S->TryLoc = ReadSourceLocation();
1219 S->ForLoc = ReadSourceLocation();
1220 S->CoawaitLoc = ReadSourceLocation();
1221 S->ColonLoc = ReadSourceLocation();
1222 S->RParenLoc = ReadSourceLocation();
1234 S->KeywordLoc = ReadSourceLocation();
1235 S->IsIfExists = Record.
readInt();
1237 ReadDeclarationNameInfo(S->NameInfo);
1250 E->NumArgs = Record.
readInt();
1255 E->setConstructor(ReadDeclAs<CXXConstructorDecl>());
1263 E->ParenOrBraceRange = ReadSourceRange();
1268 E->Constructor = ReadDeclAs<CXXConstructorDecl>();
1269 E->Loc = ReadSourceLocation();
1270 E->ConstructsVirtualBase = Record.
readInt();
1271 E->InheritedFromVirtualBase = Record.
readInt();
1275 VisitCXXConstructExpr(E);
1276 E->Type = GetTypeSourceInfo();
1279 void ASTStmtReader::VisitLambdaExpr(
LambdaExpr *E) {
1281 unsigned NumCaptures = Record.
readInt();
1282 assert(NumCaptures == E->NumCaptures);(void)NumCaptures;
1283 E->IntroducerRange = ReadSourceRange();
1285 E->CaptureDefaultLoc = ReadSourceLocation();
1286 E->ExplicitParams = Record.
readInt();
1287 E->ExplicitResultType = Record.
readInt();
1288 E->ClosingBrace = ReadSourceLocation();
1304 VisitExplicitCastExpr(E);
1307 E->RParenLoc = R.
getEnd();
1308 R = ReadSourceRange();
1309 E->AngleBrackets = R;
1313 return VisitCXXNamedCastExpr(E);
1317 return VisitCXXNamedCastExpr(E);
1321 return VisitCXXNamedCastExpr(E);
1325 return VisitCXXNamedCastExpr(E);
1329 VisitExplicitCastExpr(E);
1336 E->UDSuffixLoc = ReadSourceLocation();
1355 GetTypeSourceInfo());
1363 void ASTStmtReader::VisitCXXThisExpr(
CXXThisExpr *E) {
1369 void ASTStmtReader::VisitCXXThrowExpr(
CXXThrowExpr *E) {
1371 E->ThrowLoc = ReadSourceLocation();
1373 E->IsThrownVariableInScope = Record.
readInt();
1378 E->Param = ReadDeclAs<ParmVarDecl>();
1379 E->Loc = ReadSourceLocation();
1384 E->Field = ReadDeclAs<FieldDecl>();
1385 E->Loc = ReadSourceLocation();
1396 E->TypeInfo = GetTypeSourceInfo();
1397 E->RParenLoc = ReadSourceLocation();
1400 void ASTStmtReader::VisitCXXNewExpr(
CXXNewExpr *E) {
1402 E->GlobalNew = Record.
readInt();
1403 bool isArray = Record.
readInt();
1404 E->PassAlignment = Record.
readInt();
1405 E->UsualArrayDeleteWantsSize = Record.
readInt();
1406 unsigned NumPlacementArgs = Record.
readInt();
1407 E->StoredInitializationStyle = Record.
readInt();
1410 E->AllocatedTypeInfo = GetTypeSourceInfo();
1411 E->TypeIdParens = ReadSourceRange();
1412 E->Range = ReadSourceRange();
1413 E->DirectInitRange = ReadSourceRange();
1416 E->StoredInitializationStyle != 0);
1426 E->GlobalDelete = Record.
readInt();
1427 E->ArrayForm = Record.
readInt();
1428 E->ArrayFormAsWritten = Record.
readInt();
1429 E->UsualArrayDeleteWantsSize = Record.
readInt();
1430 E->OperatorDelete = ReadDeclAs<FunctionDecl>();
1432 E->Loc = ReadSourceLocation();
1439 E->IsArrow = Record.
readInt();
1440 E->OperatorLoc = ReadSourceLocation();
1442 E->ScopeType = GetTypeSourceInfo();
1443 E->ColonColonLoc = ReadSourceLocation();
1444 E->TildeLoc = ReadSourceLocation();
1456 unsigned NumObjects = Record.
readInt();
1458 for (
unsigned i = 0; i != NumObjects; ++i)
1459 E->getTrailingObjects<
BlockDecl *>()[i] =
1460 ReadDeclAs<BlockDecl>();
1471 ReadTemplateKWAndArgsInfo(
1478 E->IsArrow = Record.
readInt();
1479 E->OperatorLoc = ReadSourceLocation();
1481 E->FirstQualifierFoundInScope = ReadDeclAs<NamedDecl>();
1482 ReadDeclarationNameInfo(E->MemberNameInfo);
1490 ReadTemplateKWAndArgsInfo(
1496 ReadDeclarationNameInfo(E->NameInfo);
1503 "Read wrong record during creation ?");
1505 for (
unsigned I = 0, N = E->
arg_size(); I != N; ++I)
1507 E->Type = GetTypeSourceInfo();
1512 void ASTStmtReader::VisitOverloadExpr(
OverloadExpr *E) {
1520 unsigned NumDecls = Record.
readInt();
1522 for (
unsigned i = 0; i != NumDecls; ++i) {
1529 ReadDeclarationNameInfo(E->NameInfo);
1534 VisitOverloadExpr(E);
1535 E->IsArrow = Record.
readInt();
1536 E->HasUnresolvedUsing = Record.
readInt();
1539 E->OperatorLoc = ReadSourceLocation();
1543 VisitOverloadExpr(E);
1544 E->RequiresADL = Record.
readInt();
1545 E->Overloaded = Record.
readInt();
1546 E->NamingClass = ReadDeclAs<CXXRecordDecl>();
1556 E->RParenLoc = Range.
getEnd();
1559 for (
unsigned I = 0, N = E->
getNumArgs(); I != N; ++I)
1560 Args[I] = GetTypeSourceInfo();
1566 E->Value = (
unsigned int)Record.
readInt();
1569 E->RParen = Range.
getEnd();
1570 E->QueriedType = GetTypeSourceInfo();
1581 E->RParen = Range.
getEnd();
1587 E->Range = ReadSourceRange();
1593 E->EllipsisLoc = ReadSourceLocation();
1594 E->NumExpansions = Record.
readInt();
1600 unsigned NumPartialArgs = Record.
readInt();
1601 E->OperatorLoc = ReadSourceLocation();
1602 E->PackLoc = ReadSourceLocation();
1603 E->RParenLoc = ReadSourceLocation();
1606 assert(E->Length == NumPartialArgs);
1608 *E = I + NumPartialArgs;
1616 void ASTStmtReader::VisitSubstNonTypeTemplateParmExpr(
1619 E->Param = ReadDeclAs<NonTypeTemplateParmDecl>();
1620 E->NameLoc = ReadSourceLocation();
1624 void ASTStmtReader::VisitSubstNonTypeTemplateParmPackExpr(
1627 E->Param = ReadDeclAs<NonTypeTemplateParmDecl>();
1633 E->NumArguments = ArgPack.pack_size();
1634 E->NameLoc = ReadSourceLocation();
1639 E->NumParameters = Record.
readInt();
1640 E->ParamPack = ReadDeclAs<ParmVarDecl>();
1641 E->NameLoc = ReadSourceLocation();
1643 for (
unsigned i = 0, n = E->NumParameters; i != n; ++i)
1644 Parms[i] = ReadDeclAs<ParmVarDecl>();
1650 auto VD = ReadDeclAs<ValueDecl>();
1651 unsigned ManglingNumber = Record.
readInt();
1655 void ASTStmtReader::VisitCXXFoldExpr(
CXXFoldExpr *E) {
1657 E->LParenLoc = ReadSourceLocation();
1658 E->EllipsisLoc = ReadSourceLocation();
1659 E->RParenLoc = ReadSourceLocation();
1668 E->Loc = ReadSourceLocation();
1671 void ASTStmtReader::VisitTypoExpr(
TypoExpr *E) {
1672 llvm_unreachable(
"Cannot read TypoExpr nodes");
1680 E->IsArrow = (Record.
readInt() != 0);
1683 E->MemberLoc = ReadSourceLocation();
1684 E->TheDecl = ReadDeclAs<MSPropertyDecl>();
1697 std::string UuidStr = ReadString();
1701 GetTypeSourceInfo());
1709 void ASTStmtReader::VisitSEHLeaveStmt(
SEHLeaveStmt *S) {
1716 S->Loc = ReadSourceLocation();
1717 S->Children[SEHExceptStmt::FILTER_EXPR] = Record.
readSubStmt();
1723 S->Loc = ReadSourceLocation();
1727 void ASTStmtReader::VisitSEHTryStmt(
SEHTryStmt *S) {
1729 S->IsCXXTry = Record.
readInt();
1730 S->TryLoc = ReadSourceLocation();
1731 S->Children[SEHTryStmt::TRY] = Record.
readSubStmt();
1732 S->Children[SEHTryStmt::HANDLER] = Record.
readSubStmt();
1747 void ASTStmtReader::VisitAsTypeExpr(
AsTypeExpr *E) {
1749 E->BuiltinLoc = ReadSourceLocation();
1750 E->RParenLoc = ReadSourceLocation();
1764 : Reader(R), Context(Record.getContext()) {}
1765 #define OPENMP_CLAUSE(Name, Class) void Visit##Class(Class *C); 1766 #include "clang/Basic/OpenMPKinds.def" 1775 switch (Reader->Record.readInt()) {
1782 case OMPC_num_threads:
1797 case OMPC_proc_bind:
1812 case OMPC_mergeable:
1842 case OMPC_firstprivate:
1845 case OMPC_lastprivate:
1851 case OMPC_reduction:
1854 case OMPC_task_reduction:
1857 case OMPC_in_reduction:
1869 case OMPC_copyprivate:
1882 unsigned NumVars = Reader->Record.readInt();
1883 unsigned NumDeclarations = Reader->Record.readInt();
1884 unsigned NumLists = Reader->Record.readInt();
1885 unsigned NumComponents = Reader->Record.readInt();
1890 case OMPC_num_teams:
1893 case OMPC_thread_limit:
1899 case OMPC_grainsize:
1902 case OMPC_num_tasks:
1908 case OMPC_dist_schedule:
1911 case OMPC_defaultmap:
1915 unsigned NumVars = Reader->Record.readInt();
1916 unsigned NumDeclarations = Reader->Record.readInt();
1917 unsigned NumLists = Reader->Record.readInt();
1918 unsigned NumComponents = Reader->Record.readInt();
1924 unsigned NumVars = Reader->Record.readInt();
1925 unsigned NumDeclarations = Reader->Record.readInt();
1926 unsigned NumLists = Reader->Record.readInt();
1927 unsigned NumComponents = Reader->Record.readInt();
1932 case OMPC_use_device_ptr: {
1933 unsigned NumVars = Reader->Record.readInt();
1934 unsigned NumDeclarations = Reader->Record.readInt();
1935 unsigned NumLists = Reader->Record.readInt();
1936 unsigned NumComponents = Reader->Record.readInt();
1938 NumLists, NumComponents);
1941 case OMPC_is_device_ptr: {
1942 unsigned NumVars = Reader->Record.readInt();
1943 unsigned NumDeclarations = Reader->Record.readInt();
1944 unsigned NumLists = Reader->Record.readInt();
1945 unsigned NumComponents = Reader->Record.readInt();
1947 NumLists, NumComponents);
1953 C->
setLocEnd(Reader->ReadSourceLocation());
1964 VisitOMPClauseWithPreInit(C);
1968 void OMPClauseReader::VisitOMPIfClause(
OMPIfClause *C) {
1969 VisitOMPClauseWithPreInit(C);
1970 C->setNameModifier(static_cast<OpenMPDirectiveKind>(Reader->Record.readInt()));
1971 C->setNameModifierLoc(Reader->ReadSourceLocation());
1972 C->setColonLoc(Reader->ReadSourceLocation());
1973 C->setCondition(Reader->Record.readSubExpr());
1978 C->setCondition(Reader->Record.readSubExpr());
1983 VisitOMPClauseWithPreInit(C);
1984 C->setNumThreads(Reader->Record.readSubExpr());
1989 C->setSafelen(Reader->Record.readSubExpr());
1994 C->setSimdlen(Reader->Record.readSubExpr());
1999 C->setNumForLoops(Reader->Record.readSubExpr());
2005 static_cast<OpenMPDefaultClauseKind>(Reader->Record.readInt()));
2007 C->setDefaultKindKwLoc(Reader->ReadSourceLocation());
2012 static_cast<OpenMPProcBindClauseKind>(Reader->Record.readInt()));
2014 C->setProcBindKindKwLoc(Reader->ReadSourceLocation());
2018 VisitOMPClauseWithPreInit(C);
2020 static_cast<OpenMPScheduleClauseKind>(Reader->Record.readInt()));
2021 C->setFirstScheduleModifier(
2022 static_cast<OpenMPScheduleClauseModifier>(Reader->Record.readInt()));
2023 C->setSecondScheduleModifier(
2024 static_cast<OpenMPScheduleClauseModifier>(Reader->Record.readInt()));
2025 C->setChunkSize(Reader->Record.readSubExpr());
2026 C->setLParenLoc(Reader->ReadSourceLocation());
2027 C->setFirstScheduleModifierLoc(Reader->ReadSourceLocation());
2028 C->setSecondScheduleModifierLoc(Reader->ReadSourceLocation());
2029 C->setScheduleKindLoc(Reader->ReadSourceLocation());
2030 C->setCommaLoc(Reader->ReadSourceLocation());
2034 C->setNumForLoops(Reader->Record.readSubExpr());
2044 void OMPClauseReader::VisitOMPReadClause(
OMPReadClause *) {}
2056 void OMPClauseReader::VisitOMPSIMDClause(
OMPSIMDClause *) {}
2064 Vars.reserve(NumVars);
2065 for (
unsigned i = 0; i != NumVars; ++i)
2066 Vars.push_back(Reader->Record.readSubExpr());
2069 for (
unsigned i = 0; i != NumVars; ++i)
2070 Vars.push_back(Reader->Record.readSubExpr());
2071 C->setPrivateCopies(Vars);
2075 VisitOMPClauseWithPreInit(C);
2079 Vars.reserve(NumVars);
2080 for (
unsigned i = 0; i != NumVars; ++i)
2081 Vars.push_back(Reader->Record.readSubExpr());
2084 for (
unsigned i = 0; i != NumVars; ++i)
2085 Vars.push_back(Reader->Record.readSubExpr());
2086 C->setPrivateCopies(Vars);
2088 for (
unsigned i = 0; i != NumVars; ++i)
2089 Vars.push_back(Reader->Record.readSubExpr());
2094 VisitOMPClauseWithPostUpdate(C);
2098 Vars.reserve(NumVars);
2099 for (
unsigned i = 0; i != NumVars; ++i)
2100 Vars.push_back(Reader->Record.readSubExpr());
2103 for (
unsigned i = 0; i != NumVars; ++i)
2104 Vars.push_back(Reader->Record.readSubExpr());
2107 for (
unsigned i = 0; i != NumVars; ++i)
2108 Vars.push_back(Reader->Record.readSubExpr());
2109 C->setSourceExprs(Vars);
2111 for (
unsigned i = 0; i != NumVars; ++i)
2112 Vars.push_back(Reader->Record.readSubExpr());
2113 C->setDestinationExprs(Vars);
2115 for (
unsigned i = 0; i != NumVars; ++i)
2116 Vars.push_back(Reader->Record.readSubExpr());
2117 C->setAssignmentOps(Vars);
2124 Vars.reserve(NumVars);
2125 for (
unsigned i = 0; i != NumVars; ++i)
2126 Vars.push_back(Reader->Record.readSubExpr());
2131 VisitOMPClauseWithPostUpdate(C);
2133 C->setColonLoc(Reader->ReadSourceLocation());
2136 Reader->ReadDeclarationNameInfo(DNI);
2137 C->setQualifierLoc(NNSL);
2138 C->setNameInfo(DNI);
2142 Vars.reserve(NumVars);
2143 for (
unsigned i = 0; i != NumVars; ++i)
2144 Vars.push_back(Reader->Record.readSubExpr());
2147 for (
unsigned i = 0; i != NumVars; ++i)
2148 Vars.push_back(Reader->Record.readSubExpr());
2149 C->setPrivates(Vars);
2151 for (
unsigned i = 0; i != NumVars; ++i)
2152 Vars.push_back(Reader->Record.readSubExpr());
2153 C->setLHSExprs(Vars);
2155 for (
unsigned i = 0; i != NumVars; ++i)
2156 Vars.push_back(Reader->Record.readSubExpr());
2157 C->setRHSExprs(Vars);
2159 for (
unsigned i = 0; i != NumVars; ++i)
2160 Vars.push_back(Reader->Record.readSubExpr());
2161 C->setReductionOps(Vars);
2165 VisitOMPClauseWithPostUpdate(C);
2167 C->setColonLoc(Reader->ReadSourceLocation());
2170 Reader->ReadDeclarationNameInfo(DNI);
2171 C->setQualifierLoc(NNSL);
2172 C->setNameInfo(DNI);
2176 Vars.reserve(NumVars);
2177 for (
unsigned I = 0; I != NumVars; ++I)
2178 Vars.push_back(Reader->Record.readSubExpr());
2181 for (
unsigned I = 0; I != NumVars; ++I)
2182 Vars.push_back(Reader->Record.readSubExpr());
2183 C->setPrivates(Vars);
2185 for (
unsigned I = 0; I != NumVars; ++I)
2186 Vars.push_back(Reader->Record.readSubExpr());
2187 C->setLHSExprs(Vars);
2189 for (
unsigned I = 0; I != NumVars; ++I)
2190 Vars.push_back(Reader->Record.readSubExpr());
2191 C->setRHSExprs(Vars);
2193 for (
unsigned I = 0; I != NumVars; ++I)
2194 Vars.push_back(Reader->Record.readSubExpr());
2195 C->setReductionOps(Vars);
2199 VisitOMPClauseWithPostUpdate(C);
2201 C->setColonLoc(Reader->ReadSourceLocation());
2204 Reader->ReadDeclarationNameInfo(DNI);
2205 C->setQualifierLoc(NNSL);
2206 C->setNameInfo(DNI);
2210 Vars.reserve(NumVars);
2211 for (
unsigned I = 0; I != NumVars; ++I)
2212 Vars.push_back(Reader->Record.readSubExpr());
2215 for (
unsigned I = 0; I != NumVars; ++I)
2216 Vars.push_back(Reader->Record.readSubExpr());
2217 C->setPrivates(Vars);
2219 for (
unsigned I = 0; I != NumVars; ++I)
2220 Vars.push_back(Reader->Record.readSubExpr());
2221 C->setLHSExprs(Vars);
2223 for (
unsigned I = 0; I != NumVars; ++I)
2224 Vars.push_back(Reader->Record.readSubExpr());
2225 C->setRHSExprs(Vars);
2227 for (
unsigned I = 0; I != NumVars; ++I)
2228 Vars.push_back(Reader->Record.readSubExpr());
2229 C->setReductionOps(Vars);
2231 for (
unsigned I = 0; I != NumVars; ++I)
2232 Vars.push_back(Reader->Record.readSubExpr());
2233 C->setTaskgroupDescriptors(Vars);
2237 VisitOMPClauseWithPostUpdate(C);
2239 C->setColonLoc(Reader->ReadSourceLocation());
2240 C->setModifier(static_cast<OpenMPLinearClauseKind>(Reader->Record.readInt()));
2241 C->setModifierLoc(Reader->ReadSourceLocation());
2244 Vars.reserve(NumVars);
2245 for (
unsigned i = 0; i != NumVars; ++i)
2246 Vars.push_back(Reader->Record.readSubExpr());
2249 for (
unsigned i = 0; i != NumVars; ++i)
2250 Vars.push_back(Reader->Record.readSubExpr());
2251 C->setPrivates(Vars);
2253 for (
unsigned i = 0; i != NumVars; ++i)
2254 Vars.push_back(Reader->Record.readSubExpr());
2257 for (
unsigned i = 0; i != NumVars; ++i)
2258 Vars.push_back(Reader->Record.readSubExpr());
2259 C->setUpdates(Vars);
2261 for (
unsigned i = 0; i != NumVars; ++i)
2262 Vars.push_back(Reader->Record.readSubExpr());
2264 C->setStep(Reader->Record.readSubExpr());
2265 C->setCalcStep(Reader->Record.readSubExpr());
2269 C->setLParenLoc(Reader->ReadSourceLocation());
2271 unsigned NumVars = C->varlist_size();
2273 Vars.reserve(NumVars);
2274 for (
unsigned i = 0; i != NumVars; ++i)
2275 Vars.push_back(Reader->Record.readSubExpr());
2276 C->setVarRefs(Vars);
2277 C->setAlignment(Reader->Record.readSubExpr());
2281 C->setLParenLoc(Reader->ReadSourceLocation());
2282 unsigned NumVars = C->varlist_size();
2284 Exprs.reserve(NumVars);
2285 for (
unsigned i = 0; i != NumVars; ++i)
2286 Exprs.push_back(Reader->Record.readSubExpr());
2287 C->setVarRefs(Exprs);
2289 for (
unsigned i = 0; i != NumVars; ++i)
2290 Exprs.push_back(Reader->Record.readSubExpr());
2291 C->setSourceExprs(Exprs);
2293 for (
unsigned i = 0; i != NumVars; ++i)
2294 Exprs.push_back(Reader->Record.readSubExpr());
2295 C->setDestinationExprs(Exprs);
2297 for (
unsigned i = 0; i != NumVars; ++i)
2298 Exprs.push_back(Reader->Record.readSubExpr());
2299 C->setAssignmentOps(Exprs);
2303 C->setLParenLoc(Reader->ReadSourceLocation());
2304 unsigned NumVars = C->varlist_size();
2306 Exprs.reserve(NumVars);
2307 for (
unsigned i = 0; i != NumVars; ++i)
2308 Exprs.push_back(Reader->Record.readSubExpr());
2309 C->setVarRefs(Exprs);
2311 for (
unsigned i = 0; i != NumVars; ++i)
2312 Exprs.push_back(Reader->Record.readSubExpr());
2313 C->setSourceExprs(Exprs);
2315 for (
unsigned i = 0; i != NumVars; ++i)
2316 Exprs.push_back(Reader->Record.readSubExpr());
2317 C->setDestinationExprs(Exprs);
2319 for (
unsigned i = 0; i != NumVars; ++i)
2320 Exprs.push_back(Reader->Record.readSubExpr());
2321 C->setAssignmentOps(Exprs);
2325 C->setLParenLoc(Reader->ReadSourceLocation());
2326 unsigned NumVars = C->varlist_size();
2328 Vars.reserve(NumVars);
2329 for (
unsigned i = 0; i != NumVars; ++i)
2330 Vars.push_back(Reader->Record.readSubExpr());
2331 C->setVarRefs(Vars);
2335 C->setLParenLoc(Reader->ReadSourceLocation());
2336 C->setDependencyKind(
2337 static_cast<OpenMPDependClauseKind>(Reader->Record.readInt()));
2338 C->setDependencyLoc(Reader->ReadSourceLocation());
2339 C->setColonLoc(Reader->ReadSourceLocation());
2340 unsigned NumVars = C->varlist_size();
2342 Vars.reserve(NumVars);
2343 for (
unsigned i = 0; i != NumVars; ++i)
2344 Vars.push_back(Reader->Record.readSubExpr());
2345 C->setVarRefs(Vars);
2350 VisitOMPClauseWithPreInit(C);
2351 C->setDevice(Reader->Record.readSubExpr());
2355 void OMPClauseReader::VisitOMPMapClause(
OMPMapClause *C) {
2356 C->setLParenLoc(Reader->ReadSourceLocation());
2357 C->setMapTypeModifier(
2358 static_cast<OpenMPMapClauseKind>(Reader->Record.readInt()));
2360 static_cast<OpenMPMapClauseKind>(Reader->Record.readInt()));
2361 C->setMapLoc(Reader->ReadSourceLocation());
2362 C->setColonLoc(Reader->ReadSourceLocation());
2363 auto NumVars = C->varlist_size();
2369 Vars.reserve(NumVars);
2370 for (
unsigned i = 0; i != NumVars; ++i)
2371 Vars.push_back(Reader->Record.readSubExpr());
2372 C->setVarRefs(Vars);
2375 Decls.reserve(UniqueDecls);
2376 for (
unsigned i = 0; i < UniqueDecls; ++i)
2377 Decls.push_back(Reader->Record.readDeclAs<
ValueDecl>());
2381 ListsPerDecl.reserve(UniqueDecls);
2382 for (
unsigned i = 0; i < UniqueDecls; ++i)
2383 ListsPerDecl.push_back(Reader->Record.readInt());
2387 ListSizes.reserve(TotalLists);
2388 for (
unsigned i = 0; i < TotalLists; ++i)
2389 ListSizes.push_back(Reader->Record.readInt());
2393 Components.reserve(TotalComponents);
2394 for (
unsigned i = 0; i < TotalComponents; ++i) {
2395 Expr *AssociatedExpr = Reader->Record.readSubExpr();
2398 AssociatedExpr, AssociatedDecl));
2404 VisitOMPClauseWithPreInit(C);
2405 C->setNumTeams(Reader->Record.readSubExpr());
2410 VisitOMPClauseWithPreInit(C);
2411 C->setThreadLimit(Reader->Record.readSubExpr());
2416 C->setPriority(Reader->Record.readSubExpr());
2421 C->setGrainsize(Reader->Record.readSubExpr());
2426 C->setNumTasks(Reader->Record.readSubExpr());
2430 void OMPClauseReader::VisitOMPHintClause(
OMPHintClause *C) {
2431 C->setHint(Reader->Record.readSubExpr());
2436 VisitOMPClauseWithPreInit(C);
2437 C->setDistScheduleKind(
2438 static_cast<OpenMPDistScheduleClauseKind>(Reader->Record.readInt()));
2439 C->setChunkSize(Reader->Record.readSubExpr());
2440 C->setLParenLoc(Reader->ReadSourceLocation());
2441 C->setDistScheduleKindLoc(Reader->ReadSourceLocation());
2442 C->setCommaLoc(Reader->ReadSourceLocation());
2446 C->setDefaultmapKind(
2447 static_cast<OpenMPDefaultmapClauseKind>(Reader->Record.readInt()));
2448 C->setDefaultmapModifier(
2449 static_cast<OpenMPDefaultmapClauseModifier>(Reader->Record.readInt()));
2450 C->setLParenLoc(Reader->ReadSourceLocation());
2451 C->setDefaultmapModifierLoc(Reader->ReadSourceLocation());
2452 C->setDefaultmapKindLoc(Reader->ReadSourceLocation());
2455 void OMPClauseReader::VisitOMPToClause(
OMPToClause *C) {
2456 C->setLParenLoc(Reader->ReadSourceLocation());
2457 auto NumVars = C->varlist_size();
2463 Vars.reserve(NumVars);
2464 for (
unsigned i = 0; i != NumVars; ++i)
2465 Vars.push_back(Reader->Record.readSubExpr());
2466 C->setVarRefs(Vars);
2469 Decls.reserve(UniqueDecls);
2470 for (
unsigned i = 0; i < UniqueDecls; ++i)
2471 Decls.push_back(Reader->Record.readDeclAs<
ValueDecl>());
2475 ListsPerDecl.reserve(UniqueDecls);
2476 for (
unsigned i = 0; i < UniqueDecls; ++i)
2477 ListsPerDecl.push_back(Reader->Record.readInt());
2481 ListSizes.reserve(TotalLists);
2482 for (
unsigned i = 0; i < TotalLists; ++i)
2483 ListSizes.push_back(Reader->Record.readInt());
2487 Components.reserve(TotalComponents);
2488 for (
unsigned i = 0; i < TotalComponents; ++i) {
2489 Expr *AssociatedExpr = Reader->Record.readSubExpr();
2492 AssociatedExpr, AssociatedDecl));
2497 void OMPClauseReader::VisitOMPFromClause(
OMPFromClause *C) {
2498 C->setLParenLoc(Reader->ReadSourceLocation());
2499 auto NumVars = C->varlist_size();
2505 Vars.reserve(NumVars);
2506 for (
unsigned i = 0; i != NumVars; ++i)
2507 Vars.push_back(Reader->Record.readSubExpr());
2508 C->setVarRefs(Vars);
2511 Decls.reserve(UniqueDecls);
2512 for (
unsigned i = 0; i < UniqueDecls; ++i)
2513 Decls.push_back(Reader->Record.readDeclAs<
ValueDecl>());
2517 ListsPerDecl.reserve(UniqueDecls);
2518 for (
unsigned i = 0; i < UniqueDecls; ++i)
2519 ListsPerDecl.push_back(Reader->Record.readInt());
2523 ListSizes.reserve(TotalLists);
2524 for (
unsigned i = 0; i < TotalLists; ++i)
2525 ListSizes.push_back(Reader->Record.readInt());
2529 Components.reserve(TotalComponents);
2530 for (
unsigned i = 0; i < TotalComponents; ++i) {
2531 Expr *AssociatedExpr = Reader->Record.readSubExpr();
2534 AssociatedExpr, AssociatedDecl));
2540 C->setLParenLoc(Reader->ReadSourceLocation());
2541 auto NumVars = C->varlist_size();
2547 Vars.reserve(NumVars);
2548 for (
unsigned i = 0; i != NumVars; ++i)
2549 Vars.push_back(Reader->Record.readSubExpr());
2550 C->setVarRefs(Vars);
2552 for (
unsigned i = 0; i != NumVars; ++i)
2553 Vars.push_back(Reader->Record.readSubExpr());
2554 C->setPrivateCopies(Vars);
2556 for (
unsigned i = 0; i != NumVars; ++i)
2557 Vars.push_back(Reader->Record.readSubExpr());
2561 Decls.reserve(UniqueDecls);
2562 for (
unsigned i = 0; i < UniqueDecls; ++i)
2563 Decls.push_back(Reader->Record.readDeclAs<
ValueDecl>());
2567 ListsPerDecl.reserve(UniqueDecls);
2568 for (
unsigned i = 0; i < UniqueDecls; ++i)
2569 ListsPerDecl.push_back(Reader->Record.readInt());
2573 ListSizes.reserve(TotalLists);
2574 for (
unsigned i = 0; i < TotalLists; ++i)
2575 ListSizes.push_back(Reader->Record.readInt());
2579 Components.reserve(TotalComponents);
2580 for (
unsigned i = 0; i < TotalComponents; ++i) {
2581 Expr *AssociatedExpr = Reader->Record.readSubExpr();
2584 AssociatedExpr, AssociatedDecl));
2590 C->setLParenLoc(Reader->ReadSourceLocation());
2591 auto NumVars = C->varlist_size();
2597 Vars.reserve(NumVars);
2598 for (
unsigned i = 0; i != NumVars; ++i)
2599 Vars.push_back(Reader->Record.readSubExpr());
2600 C->setVarRefs(Vars);
2604 Decls.reserve(UniqueDecls);
2605 for (
unsigned i = 0; i < UniqueDecls; ++i)
2606 Decls.push_back(Reader->Record.readDeclAs<
ValueDecl>());
2610 ListsPerDecl.reserve(UniqueDecls);
2611 for (
unsigned i = 0; i < UniqueDecls; ++i)
2612 ListsPerDecl.push_back(Reader->Record.readInt());
2616 ListSizes.reserve(TotalLists);
2617 for (
unsigned i = 0; i < TotalLists; ++i)
2618 ListSizes.push_back(Reader->Record.readInt());
2622 Components.reserve(TotalComponents);
2623 for (
unsigned i = 0; i < TotalComponents; ++i) {
2624 Expr *AssociatedExpr = Reader->Record.readSubExpr();
2627 AssociatedExpr, AssociatedDecl));
2641 Clauses.push_back(ClauseReader.
readClause());
2651 VisitOMPExecutableDirective(D);
2687 Sub.reserve(CollapsedNum);
2688 for (
unsigned i = 0; i < CollapsedNum; ++i)
2692 for (
unsigned i = 0; i < CollapsedNum; ++i)
2696 for (
unsigned i = 0; i < CollapsedNum; ++i)
2700 for (
unsigned i = 0; i < CollapsedNum; ++i)
2704 for (
unsigned i = 0; i < CollapsedNum; ++i)
2713 VisitOMPExecutableDirective(D);
2714 D->setHasCancel(Record.
readInt());
2718 VisitOMPLoopDirective(D);
2722 VisitOMPLoopDirective(D);
2723 D->setHasCancel(Record.
readInt());
2727 VisitOMPLoopDirective(D);
2734 VisitOMPExecutableDirective(D);
2735 D->setHasCancel(Record.
readInt());
2740 VisitOMPExecutableDirective(D);
2748 VisitOMPExecutableDirective(D);
2753 VisitOMPExecutableDirective(D);
2760 VisitOMPExecutableDirective(D);
2761 ReadDeclarationNameInfo(D->DirName);
2765 VisitOMPLoopDirective(D);
2766 D->setHasCancel(Record.
readInt());
2769 void ASTStmtReader::VisitOMPParallelForSimdDirective(
2771 VisitOMPLoopDirective(D);
2774 void ASTStmtReader::VisitOMPParallelSectionsDirective(
2779 VisitOMPExecutableDirective(D);
2780 D->setHasCancel(Record.
readInt());
2787 VisitOMPExecutableDirective(D);
2788 D->setHasCancel(Record.
readInt());
2793 VisitOMPExecutableDirective(D);
2798 VisitOMPExecutableDirective(D);
2803 VisitOMPExecutableDirective(D);
2810 VisitOMPExecutableDirective(D);
2818 VisitOMPExecutableDirective(D);
2825 VisitOMPExecutableDirective(D);
2832 VisitOMPExecutableDirective(D);
2837 D->IsXLHSInRHSPart = Record.
readInt() != 0;
2838 D->IsPostfixUpdate = Record.
readInt() != 0;
2845 VisitOMPExecutableDirective(D);
2851 VisitOMPExecutableDirective(D);
2854 void ASTStmtReader::VisitOMPTargetEnterDataDirective(
2858 VisitOMPExecutableDirective(D);
2861 void ASTStmtReader::VisitOMPTargetExitDataDirective(
2865 VisitOMPExecutableDirective(D);
2868 void ASTStmtReader::VisitOMPTargetParallelDirective(
2872 VisitOMPExecutableDirective(D);
2875 void ASTStmtReader::VisitOMPTargetParallelForDirective(
2877 VisitOMPLoopDirective(D);
2878 D->setHasCancel(Record.
readInt());
2885 VisitOMPExecutableDirective(D);
2888 void ASTStmtReader::VisitOMPCancellationPointDirective(
2891 VisitOMPExecutableDirective(D);
2892 D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record.
readInt()));
2899 VisitOMPExecutableDirective(D);
2900 D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record.
readInt()));
2904 VisitOMPLoopDirective(D);
2908 VisitOMPLoopDirective(D);
2912 VisitOMPLoopDirective(D);
2918 VisitOMPExecutableDirective(D);
2920 void ASTStmtReader::VisitOMPDistributeParallelForDirective(
2922 VisitOMPLoopDirective(D);
2923 D->setHasCancel(Record.
readInt());
2926 void ASTStmtReader::VisitOMPDistributeParallelForSimdDirective(
2928 VisitOMPLoopDirective(D);
2931 void ASTStmtReader::VisitOMPDistributeSimdDirective(
2933 VisitOMPLoopDirective(D);
2936 void ASTStmtReader::VisitOMPTargetParallelForSimdDirective(
2938 VisitOMPLoopDirective(D);
2942 VisitOMPLoopDirective(D);
2945 void ASTStmtReader::VisitOMPTeamsDistributeDirective(
2947 VisitOMPLoopDirective(D);
2950 void ASTStmtReader::VisitOMPTeamsDistributeSimdDirective(
2952 VisitOMPLoopDirective(D);
2955 void ASTStmtReader::VisitOMPTeamsDistributeParallelForSimdDirective(
2957 VisitOMPLoopDirective(D);
2960 void ASTStmtReader::VisitOMPTeamsDistributeParallelForDirective(
2962 VisitOMPLoopDirective(D);
2963 D->setHasCancel(Record.
readInt());
2970 VisitOMPExecutableDirective(D);
2973 void ASTStmtReader::VisitOMPTargetTeamsDistributeDirective(
2975 VisitOMPLoopDirective(D);
2978 void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForDirective(
2980 VisitOMPLoopDirective(D);
2981 D->setHasCancel(Record.
readInt());
2984 void ASTStmtReader::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
2986 VisitOMPLoopDirective(D);
2989 void ASTStmtReader::VisitOMPTargetTeamsDistributeSimdDirective(
2991 VisitOMPLoopDirective(D);
2999 switch (ReadingKind) {
3001 llvm_unreachable(
"should not call this when not reading anything");
3004 return ReadStmtFromStream(F);
3006 return ReadSubStmt();
3009 llvm_unreachable(
"ReadingKind not set ?");
3013 return cast_or_null<Expr>(ReadStmt(F));
3017 return cast_or_null<Expr>(ReadSubStmt());
3029 ReadingKindTracker ReadingKind(Read_Stmt, *
this);
3034 llvm::DenseMap<uint64_t, Stmt *> StmtEntries;
3037 unsigned PrevNumStmts = StmtStack.size();
3045 llvm::BitstreamEntry Entry = Cursor.advanceSkippingSubblocks();
3047 switch (Entry.Kind) {
3048 case llvm::BitstreamEntry::SubBlock:
3050 Error(
"malformed block record in AST file");
3052 case llvm::BitstreamEntry::EndBlock:
3054 case llvm::BitstreamEntry::Record:
3061 bool Finished =
false;
3062 bool IsStmtReference =
false;
3069 IsStmtReference =
true;
3070 assert(StmtEntries.find(Record[0]) != StmtEntries.end() &&
3071 "No stmt was recorded for this offset reference!");
3072 S = StmtEntries[Record.
readInt()];
3103 Record[ASTStmtReader::NumStmtFields]);
3107 S =
new (Context)
IfStmt(Empty);
3119 S =
new (Context)
DoStmt(Empty);
3123 S =
new (Context)
ForStmt(Empty);
3160 Record[ASTStmtReader::NumStmtFields]);
3171 Record[ASTStmtReader::NumExprFields + 1],
3172 Record[ASTStmtReader::NumExprFields + 2],
3173 Record[ASTStmtReader::NumExprFields + 2] ?
3174 Record[ASTStmtReader::NumExprFields + 5] : 0);
3191 Record[ASTStmtReader::NumExprFields + 1]);
3212 Record[ASTStmtReader::NumExprFields],
3213 Record[ASTStmtReader::NumExprFields + 1]);
3229 S =
new (Context)
CallExpr(Context, Stmt::CallExprClass, Empty);
3237 assert(Record.
getIdx() == 0);
3245 bool HasTemplateKWAndArgsInfo = Record.
readInt();
3246 if (HasTemplateKWAndArgsInfo) {
3248 unsigned NumTemplateArgs = Record.
readInt();
3251 for (
unsigned i = 0; i != NumTemplateArgs; ++i)
3255 bool HadMultipleCandidates = Record.
readInt();
3268 bool IsArrow = Record.
readInt();
3272 TemplateKWLoc, MemberD, FoundDecl, MemberNameInfo,
3273 HasTemplateKWAndArgsInfo ? &ArgInfo :
nullptr, T,
3277 if (HadMultipleCandidates)
3278 cast<MemberExpr>(S)->setHadMultipleCandidates(
true);
3300 Record[ASTStmtReader::NumExprFields]);
3305 Record[ASTStmtReader::NumExprFields]);
3322 Record[ASTStmtReader::NumExprFields] - 1);
3390 Record[ASTStmtReader::NumExprFields]);
3394 Record[ASTStmtReader::NumExprFields],
3395 Record[ASTStmtReader::NumExprFields + 1]);
3416 llvm_unreachable(
"mismatching AST file");
3419 Record[ASTStmtReader::NumExprFields],
3420 Record[ASTStmtReader::NumExprFields + 1]);
3442 Record[ASTStmtReader::NumStmtFields],
3443 Record[ASTStmtReader::NumStmtFields + 1]);
3478 Record[ASTStmtReader::NumStmtFields]);
3495 Record[ASTStmtReader::NumStmtFields],
3501 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3503 CollapsedNum, Empty);
3509 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3517 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3525 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3534 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3543 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3548 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3550 CollapsedNum, Empty);
3556 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3558 CollapsedNum, Empty);
3564 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3569 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3586 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3591 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3596 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3601 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3606 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3611 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3616 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3621 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3626 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3631 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3633 CollapsedNum, Empty);
3639 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3644 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3653 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3658 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3666 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3668 CollapsedNum, Empty);
3674 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3682 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3684 CollapsedNum, Empty);
3690 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3699 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3701 CollapsedNum, Empty);
3707 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3709 CollapsedNum, Empty);
3715 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3723 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3725 CollapsedNum, Empty);
3731 unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3733 CollapsedNum, Empty);
3739 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3741 Context, NumClauses, CollapsedNum, Empty);
3747 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3749 Context, NumClauses, CollapsedNum, Empty);
3755 Context, Record[ASTStmtReader::NumStmtFields], Empty);
3761 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3763 CollapsedNum, Empty);
3769 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3771 Context, NumClauses, CollapsedNum, Empty);
3777 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3779 Context, NumClauses, CollapsedNum, Empty);
3785 auto CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1];
3787 Context, NumClauses, CollapsedNum, Empty);
3813 Record[ASTStmtReader::NumExprFields]);
3818 Record[ASTStmtReader::NumExprFields]);
3823 Record[ASTStmtReader::NumExprFields]);
3832 Record[ASTStmtReader::NumExprFields]);
3899 Record[ASTStmtReader::NumExprFields]);
3904 Record[ASTStmtReader::NumExprFields],
3905 Record[ASTStmtReader::NumExprFields]
3906 ? Record[ASTStmtReader::NumExprFields + 1]
3912 Record[ASTStmtReader::NumExprFields],
3913 Record[ASTStmtReader::NumExprFields]
3914 ? Record[ASTStmtReader::NumExprFields + 1]
3920 Record[ASTStmtReader::NumExprFields]);
3925 Record[ASTStmtReader::NumExprFields],
3926 Record[ASTStmtReader::NumExprFields]
3927 ? Record[ASTStmtReader::NumExprFields + 1]
3933 Record[ASTStmtReader::NumExprFields],
3934 Record[ASTStmtReader::NumExprFields]
3935 ? Record[ASTStmtReader::NumExprFields + 1]
3941 Record[ASTStmtReader::NumExprFields]);
3963 Record[ASTStmtReader::NumExprFields]);
3976 Record[ASTStmtReader::NumExprFields]);
4043 ++NumStatementsRead;
4045 if (S && !IsStmtReference) {
4047 StmtEntries[Cursor.GetCurrentBitNo()] = S;
4051 "Invalid deserialization of statement");
4052 StmtStack.push_back(S);
4055 assert(StmtStack.size() > PrevNumStmts &&
"Read too many sub-stmts!");
4056 assert(StmtStack.size() == PrevNumStmts + 1 &&
"Extra expressions on stack!");
4057 return StmtStack.pop_back_val();
void setPreInits(Stmt *PreInits)
A CXXConstCastExpr record.
static AttributedStmt * CreateEmpty(const ASTContext &C, unsigned NumAttrs)
void setFPFeatures(FPOptions F)
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
const uint64_t & readInt()
Returns the current value in this record, and advances to the next value.
A call to an overloaded operator written using operator syntax.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
The receiver is the instance of the superclass object.
Represents a single C99 designator.
void setConditionVariable(const ASTContext &C, VarDecl *V)
static OMPDependClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
void setValueDependent(bool VD)
Set whether this expression is value-dependent or not.
Defines the clang::ASTContext interface.
void setRParenLoc(SourceLocation L)
A CompoundLiteralExpr record.
This represents '#pragma omp distribute simd' composite directive.
This represents '#pragma omp master' directive.
DesignatorTypes
The kinds of designators that can occur in a DesignatedInitExpr.
void setRangeStmt(Stmt *S)
SourceLocation readSourceLocation()
Read a source location, advancing Idx.
The null pointer literal (C++11 [lex.nullptr])
This represents '#pragma omp task' directive.
void setEnsureUpperBound(Expr *EUB)
This represents a GCC inline-assembly statement extension.
Represents a 'co_await' expression while the type of the promise is dependent.
void setSubStmt(CompoundStmt *S)
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
A UserDefinedLiteral record.
The receiver is an object instance.
unsigned getNumInputs() const
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
static OMPCopyinClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
An IndirectGotoStmt record.
This represents clause 'copyin' in the '#pragma omp ...' directives.
A (possibly-)qualified type.
static OMPUseDevicePtrClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for NumVars variables.
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument.
void setOperatorLoc(SourceLocation L)
static StringLiteral * CreateEmpty(const ASTContext &C, unsigned NumStrs)
Construct an empty string literal.
void setRawSemantics(APFloatSemantics Sem)
Set the raw enumeration value representing the floating-point semantics of this literal (32-bit IEEE...
void setNRVOCandidate(const VarDecl *Var)
void setLocation(SourceLocation L)
A CXXStaticCastExpr record.
ASTStmtReader(ASTRecordReader &Record, llvm::BitstreamCursor &Cursor)
void setCombinedCond(Expr *CombCond)
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
An AttributedStmt record.
A CXXReinterpretCastExpr record.
An ObjCBoolLiteralExpr record.
void setCombinedLowerBoundVariable(Expr *CombLB)
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setHasCancel(bool Has)
Set cancel state.
void setUniqueDecls(ArrayRef< ValueDecl *> UDs)
Set the unique declarations that are in the trailing objects of the class.
Represents a 'co_return' statement in the C++ Coroutines TS.
Stmt - This represents one statement.
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
void setLastIteration(Expr *LI)
This represents clause 'in_reduction' in the '#pragma omp task' directives.
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
IfStmt - This represents an if/then/else.
Class that handles pre-initialization statement for some clauses, like 'shedule', 'firstprivate' etc...
void setPrivateCounters(ArrayRef< Expr *> A)
unsigned getNumOutputs() const
This represents '#pragma omp for simd' directive.
void setRParenLoc(SourceLocation L)
void setContinueLoc(SourceLocation L)
void setThrowExpr(Stmt *S)
void setAtLoc(SourceLocation L)
An ImplicitValueInitExpr record.
static OMPFirstprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
Decl - This represents one declaration (or definition), e.g.
void setDeclGroup(DeclGroupRef DGR)
This represents 'grainsize' clause in the '#pragma omp ...' directive.
An ImplicitCastExpr record.
This represents '#pragma omp teams distribute parallel for' composite directive.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setRBracket(SourceLocation RB)
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
This represents 'if' clause in the '#pragma omp ...' directive.
Defines the C++ template declaration subclasses.
void setPrevEnsureUpperBound(Expr *PrevEUB)
unsigned getNumSubExprs() const
Retrieve the total number of subexpressions in this designated initializer expression, including the actual initialized value and any expressions that occur within array and array-range designators.
Represents an attribute applied to a statement.
void setUpperBoundVariable(Expr *UB)
void setComputationResultType(QualType T)
llvm::APFloat readAPFloat(const llvm::fltSemantics &Sem)
Read a floating-point value, advancing Idx.
void setNumIterations(Expr *NI)
static OMPMapClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for for NumVars original expressions, NumUniqueDeclarations de...
ParenExpr - This represents a parethesized expression, e.g.
A CXXOperatorCallExpr record.
void setSuper(SourceLocation Loc, QualType T, bool IsInstanceSuper)
This represents 'priority' clause in the '#pragma omp ...' directive.
This represents '#pragma omp target teams distribute' combined directive.
A CXXTemporaryObjectExpr record.
Represents Objective-C's @throw statement.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setNextLowerBound(Expr *NLB)
DeclRefExprBitfields DeclRefExprBits
Represents a call to a C++ constructor.
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
A container of type source information.
This represents 'update' clause in the '#pragma omp atomic' directive.
void setSwitchCaseList(SwitchCase *SC)
Set the case list for this switch statement.
void setComponents(ArrayRef< MappableComponent > Components, ArrayRef< unsigned > CLSs)
Set the components that are in the trailing objects of the class.
void setInstanceReceiver(Expr *rec)
Turn this message send into an instance message that computes the receiver object with the given expr...
Floating point control options.
This represents '#pragma omp parallel for' directive.
MS property subscript expression.
void setStartLoc(SourceLocation L)
void setForLoc(SourceLocation L)
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
This represents '#pragma omp target teams distribute parallel for' combined directive.
void setLocation(SourceLocation Loc)
static ObjCDictionaryLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements, bool HasPackExpansions)
void setConditionVariable(const ASTContext &C, VarDecl *V)
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setLocation(SourceLocation L)
void setDelegateInitCall(bool isDelegate)
void setProtocol(ObjCProtocolDecl *P)
void setRParenLoc(SourceLocation L)
static OMPReductionClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
void setIsLastIterVariable(Expr *IL)
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
This represents '#pragma omp target exit data' directive.
void setRAngleLoc(SourceLocation Loc)
static OffsetOfExpr * CreateEmpty(const ASTContext &C, unsigned NumComps, unsigned NumExprs)
This represents 'read' clause in the '#pragma omp atomic' directive.
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents clause 'private' in the '#pragma omp ...' directives.
static OMPParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for N clauses.
bool hasTemplateKWAndArgsInfo() const
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
This represents 'num_threads' clause in the '#pragma omp ...' directive.
CompoundLiteralExpr - [C99 6.5.2.5].
void setSubExpr(unsigned Idx, Expr *E)
void setInitializer(Expr *E)
void setLength(Expr *E)
Set length of the array section.
void setOpLoc(SourceLocation L)
void recordSwitchCaseID(SwitchCase *SC, unsigned ID)
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
This represents 'defaultmap' clause in the '#pragma omp ...' directive.
static FunctionParmPackExpr * CreateEmpty(const ASTContext &Context, unsigned NumParams)
void setAsmLoc(SourceLocation L)
static DependentScopeDeclRefExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
QualType readType()
Read a type from the current position in the record.
ObjCMethodDecl - Represents an instance or class method declaration.
void setValue(unsigned Val)
A ConditionOperator record.
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
static DeclRefExpr * CreateEmpty(const ASTContext &Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
Construct an empty declaration reference expression.
void setGNUSyntax(bool GNU)
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
A CXXConstructExpr record.
unsigned getNumExpressions() const
void setBeginStmt(Stmt *S)
void setBase(Expr *E)
Set base of the array section.
ReceiverKind
The kind of receiver this message is sending to.
raw_arg_iterator raw_arg_begin()
void initializeResults(const ASTContext &C, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
A C++ throw-expression (C++ [except.throw]).
unsigned getTotalComponentsNum() const
Return the total number of components in all lists derived from the clause.
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
ParmVarDecl - Represents a parameter to a function.
static OMPTaskReductionClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
This represents 'nogroup' clause in the '#pragma omp ...' directive.
A ShuffleVectorExpr record.
This represents 'safelen' clause in the '#pragma omp ...' directive.
A C++ static_cast expression (C++ [expr.static.cast]).
IdentifierInfo * getIdentifier() const
getIdentifier - Get the identifier that names this declaration, if there is one.
LabelStmt - Represents a label, which has a substatement.
void AllocateArgsArray(const ASTContext &C, bool isArray, unsigned numPlaceArgs, bool hasInitializer)
static OMPTargetExitDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
void setStrTokenLoc(unsigned TokNum, SourceLocation L)
void setAtLoc(SourceLocation L)
Represents a C99 designated initializer expression.
unsigned varlist_size() const
DeclarationName getDeclName() const
getDeclName - Get the actual, stored name of the declaration, which may be a special name...
NestedNameSpecifierLoc readNestedNameSpecifierLoc()
static OMPTargetTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
One of these records is kept for each identifier that is lexed.
An ObjCAtThrowStmt record.
T * readDeclAs()
Reads a declaration from the given position in the record, advancing Idx.
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
A DesignatedInitExpr record.
This represents '#pragma omp parallel' directive.
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
void setExprOperand(Expr *E)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
This represents 'simd' clause in the '#pragma omp ...' directive.
static OMPTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Internal struct for storing Key/value pair.
An ObjCProtocolExpr record.
An ObjCSelectorExpr record.
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static ObjCMessageExpr * CreateEmpty(const ASTContext &Context, unsigned NumArgs, unsigned NumStoredSelLocs)
Create an empty Objective-C message expression, to be filled in by subsequent calls.
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
void setIsMicrosoftABI(bool IsMS)
Represents a place-holder for an object not to be initialized by anything.
void setNumArgs(const ASTContext &C, unsigned NumArgs)
setNumArgs - This changes the number of arguments present in this call.
void setRequiresZeroInitialization(bool ZeroInit)
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
This represents clause 'map' in the '#pragma omp ...' directives.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setArg(unsigned I, Expr *E)
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
This represents clause 'to' in the '#pragma omp ...' directives.
void setColonLoc(SourceLocation Loc)
Sets the location of ':'.
void setRParen(SourceLocation Loc)
TemplateArgument readTemplateArgument(bool Canonicalize=false)
Read a template argument, advancing Idx.
This represents '#pragma omp target simd' directive.
void setCapturedDecl(CapturedDecl *D)
Set the outlined function declaration.
void setReturnLoc(SourceLocation L)
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
OpenMPDirectiveKind getDirectiveKind() const
void VisitOMPClauseWithPostUpdate(OMPClauseWithPostUpdate *C)
This represents '#pragma omp barrier' directive.
void setComponent(unsigned Idx, OffsetOfNode ON)
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
TypeSourceInfo * getTypeSourceInfo()
Reads a declarator info from the given record, advancing Idx.
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc...
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
This represents '#pragma omp critical' directive.
for(const auto &A :T->param_types())
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
void setRParenLoc(SourceLocation L)
size_t size() const
The length of this record.
Represents Objective-C's @catch statement.
void setLBraceLoc(SourceLocation Loc)
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
IndirectGotoStmt - This represents an indirect goto.
Describes an C or C++ initializer list.
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
This represents '#pragma omp distribute parallel for' composite directive.
void setValue(const ASTContext &C, const llvm::APInt &Val)
This represents '#pragma omp teams distribute parallel for simd' composite directive.
void setBuiltinLoc(SourceLocation L)
ForStmt - This represents a 'for (init;cond;inc)' stmt.
void setOperatorNew(FunctionDecl *D)
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
void setLocation(SourceLocation L)
static OMPDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setSynchBody(Stmt *S)
static OMPIsDevicePtrClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for NumVars variables.
A convenient class for passing around template argument information.
static OMPInReductionClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
void setSelector(Selector S)
A reference to a previously [de]serialized Stmt record.
void setEndLoc(SourceLocation L)
capture_init_iterator capture_init_begin()
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
path_iterator path_begin()
void setLocation(SourceLocation L)
A builtin binary operation expression such as "x + y" or "x <= y".
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
static OMPTargetTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setAccessor(IdentifierInfo *II)
static OMPToClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for NumVars variables.
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
Class that handles post-update expression for some clauses, like 'lastprivate', 'reduction' etc...
SourceRange readSourceRange()
Read a source range, advancing Idx.
static const unsigned NumStmtFields
The number of record fields required for the Stmt class itself.
This represents '#pragma omp cancellation point' directive.
void setString(StringLiteral *S)
void setAsmString(StringLiteral *E)
This represents 'default' clause in the '#pragma omp ...' directive.
ObjCStringLiteral, used for Objective-C string literals i.e.
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
This represents 'final' clause in the '#pragma omp ...' directive.
This represents 'mergeable' clause in the '#pragma omp ...' directive.
void setCombinedInit(Expr *CombInit)
void setListInitialization(bool V)
This represents '#pragma omp teams' directive.
void setOperatorLoc(SourceLocation L)
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
This represents clause 'reduction' in the '#pragma omp ...' directives.
Helper class for OffsetOfExpr.
A marker record that indicates that we are at the end of an expression.
This represents '#pragma omp teams distribute simd' combined directive.
static OMPTargetParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents binding an expression to a temporary.
void setDestroyedType(IdentifierInfo *II, SourceLocation Loc)
Set the name of destroyed type for a dependent pseudo-destructor expression.
ArrayTypeTrait
Names for the array type traits.
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static IntegerLiteral * Create(const ASTContext &C, const llvm::APInt &V, QualType type, SourceLocation l)
Returns a new integer literal with value 'V' and type 'type'.
void ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args, TemplateArgumentLoc *ArgsLocArray, unsigned NumTemplateArgs)
Read and initialize a ExplicitTemplateArgumentList structure.
Represents a C++ member access expression where the actual member referenced could not be resolved be...
This represents clause 'is_device_ptr' in the '#pragma omp ...' directives.
void setRParenLoc(SourceLocation Loc)
CXXBaseSpecifier readCXXBaseSpecifier()
Read a C++ base specifier, advancing Idx.
unsigned getUniqueDeclarationsNum() const
Return the number of unique base declarations in this clause.
void setRParenLoc(SourceLocation R)
A default argument (C++ [dcl.fct.default]).
void setStmt(LabelStmt *T)
bool isTypeOperand() const
const uint64_t & peekInt()
Returns the current value in this record, without advancing.
void setSourceRange(SourceRange R)
void setRParenLoc(SourceLocation L)
This represents clause 'from' in the '#pragma omp ...' directives.
Represents the this expression in C++.
void setCastKind(CastKind K)
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
static OMPTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setEqualOrColonLoc(SourceLocation L)
This represents '#pragma omp target parallel for simd' directive.
void setArgument(Expr *E)
OpenMP 4.0 [2.4, Array Sections].
void setTypeSourceInfo(TypeSourceInfo *tsi)
ConditionalOperator - The ?: ternary operator.
static OMPTargetSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
void setAmpAmpLoc(SourceLocation L)
void setBreakLoc(SourceLocation L)
ASTTemplateKWAndArgsInfo * getTrailingASTTemplateKWAndArgsInfo()
Return the optional template keyword and arguments info.
void setFPFeatures(FPOptions F)
CompoundStmt - This represents a group of statements like { stmt stmt }.
void setBlockDecl(BlockDecl *BD)
This represents 'threads' clause in the '#pragma omp ...' directive.
This represents '#pragma omp taskgroup' directive.
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
CastKind
CastKind - The kind of operation required for a conversion.
void setSemiLoc(SourceLocation L)
This represents clause 'aligned' in the '#pragma omp ...' directives.
static OMPAlignedClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
void setLocEnd(SourceLocation Loc)
Sets the ending location of the clause.
void setLParen(SourceLocation Loc)
This represents clause 'task_reduction' in the '#pragma omp taskgroup' directives.
Represents a call to the builtin function __builtin_va_arg.
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setLeaveLoc(SourceLocation L)
This represents '#pragma omp distribute' directive.
This represents implicit clause 'depend' for the '#pragma omp task' directive.
void setString(const ASTContext &C, StringRef Str, StringKind Kind, bool IsPascal)
Sets the string data to the given string data.
void setInits(ArrayRef< Expr *> A)
void setOperatorDelete(FunctionDecl *D)
void setRParenLoc(SourceLocation L)
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
void setLocation(SourceLocation Location)
void setRParenLoc(SourceLocation Loc)
BlockDecl - This represents a block literal declaration, which is like an unnamed FunctionDecl...
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents 'capture' clause in the '#pragma omp atomic' directive.
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Expr - This represents one expression.
void setDesignators(const ASTContext &C, const Designator *Desigs, unsigned NumDesigs)
void setRBraceLoc(SourceLocation Loc)
void setIsImplicit(bool value=true)
void setWhileLoc(SourceLocation L)
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
void setRParenLoc(SourceLocation L)
const FunctionProtoType * T
This represents 'simdlen' clause in the '#pragma omp ...' directive.
void setLParenLoc(SourceLocation L)
Stmt * ReadStmt(ModuleFile &F)
Reads a statement.
void setSyntacticForm(InitListExpr *Init)
Represents a C++ functional cast expression that builds a temporary object.
void setRBracketLoc(SourceLocation L)
A C++ const_cast expression (C++ [expr.const.cast]).
void setTypeDependent(bool TD)
Set whether this expression is type-dependent or not.
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Field designator where only the field name is known.
static OMPDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
An ObjCSubscriptRefExpr record.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
raw_arg_iterator raw_arg_end()
static CXXReinterpretCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
void setUuidStr(StringRef US)
void setWrittenTypeInfo(TypeSourceInfo *TI)
void setRetValue(Expr *E)
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setObjectKind(ExprObjectKind Cat)
setObjectKind - Set the object kind produced by this expression.
bool hasQualifier() const
Determine whether this declaration reference was preceded by a C++ nested-name-specifier, e.g., N::foo.
Represents Objective-C's @synchronized statement.
ObjCSelectorExpr used for @selector in Objective-C.
A CXXStdInitializerListExpr record.
void setFinallyBody(Stmt *S)
Represents an expression that computes the length of a parameter pack.
CXXTryStmt - A C++ try block, including all handlers.
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
An ArraySubscriptExpr record.
Decl * readDecl()
Reads a declaration from the given position in a record in the given module, advancing Idx...
static FloatingLiteral * Create(const ASTContext &C, const llvm::APFloat &V, bool isexact, QualType Type, SourceLocation L)
This represents '#pragma omp target teams distribute simd' combined directive.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Information about a module that has been loaded by the ASTReader.
void setDeclNumLists(ArrayRef< unsigned > DNLs)
Set the number of lists per declaration that are in the trailing objects of the class.
This represents 'ordered' clause in the '#pragma omp ...' directive.
ExprWithCleanupsBitfields ExprWithCleanupsBits
static OMPFlushClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
An ArrayInitLoopExpr record.
unsigned getNumClauses() const
Get number of clauses.
A PseudoObjectExpr record.
void setColonLoc(SourceLocation L)
void setFinallyStmt(Stmt *S)
An ObjCIndirectCopyRestoreExpr record.
This represents '#pragma omp for' directive.
IdentifierInfo * getIdentifierInfo()
static OMPTargetEnterDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
void setValueKind(ExprValueKind Cat)
setValueKind - Set the value kind produced by this expression.
static OMPLinearClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
void setRParenLoc(SourceLocation L)
Represents a folding of a pack over an operator.
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
This represents '#pragma omp target teams' directive.
void setAssociatedStmt(Stmt *S)
Set the associated statement for the directive.
static OMPDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
An expression that sends a message to the given Objective-C object or class.
This represents a Microsoft inline-assembly statement extension.
void setColonLoc(SourceLocation L)
void setRParenLoc(SourceLocation L)
A DesignatedInitUpdateExpr record.
SourceLocation getEnd() const
void setAtLoc(SourceLocation L)
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
bool isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a taskloop directive.
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
A member reference to an MSPropertyDecl.
static OMPParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
static OMPPrivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
void setForLoc(SourceLocation Loc)
This represents '#pragma omp cancel' directive.
This represents 'collapse' clause in the '#pragma omp ...' directive.
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
void setDistInc(Expr *DistInc)
An ObjCAvailabilityCheckExpr record.
void setRParenLoc(SourceLocation L)
std::string readString()
Read a string, advancing Idx.
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
static OMPDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setClauses(ArrayRef< OMPClause *> Clauses)
Sets the list of variables for this clause.
An ObjCPropertyRefExpr record.
void skipInts(unsigned N)
Skips the specified number of values.
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
An ObjCForCollectionStmt record.
This represents '#pragma omp flush' directive.
This represents '#pragma omp parallel for simd' directive.
void setRParenLoc(SourceLocation L)
void setAtTryLoc(SourceLocation Loc)
DoStmt - This represents a 'do/while' stmt.
AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.
This represents 'seq_cst' clause in the '#pragma omp atomic' directive.
This represents 'untied' clause in the '#pragma omp ...' directive.
void setTypeOperandSourceInfo(TypeSourceInfo *TSI)
A MS-style AsmStmt record.
unsigned readRecord(llvm::BitstreamCursor &Cursor, unsigned AbbrevID)
Reads a record with id AbbrevID from Cursor, resetting the internal state.
void setLocStart(SourceLocation Loc)
Set starting location of directive kind.
static OMPParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static CoroutineBodyStmt * Create(const ASTContext &C, CtorArgs const &Args)
void setSynchExpr(Stmt *S)
This represents '#pragma omp target enter data' directive.
void setPostUpdateExpr(Expr *S)
Set pre-initialization statement for the clause.
void setUpdates(ArrayRef< Expr *> A)
const llvm::fltSemantics & getSemantics() const
Return the APFloat semantics this literal uses.
void setLowerBoundVariable(Expr *LB)
void setLParenLoc(SourceLocation L)
This represents 'num_teams' clause in the '#pragma omp ...' directive.
void setTypeSourceInfo(TypeSourceInfo *tinfo)
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
void setComputationLHSType(QualType T)
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
unsigned getNumArgs() const
Return the number of actual arguments in this message, not counting the receiver. ...
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
void setDecl(LabelDecl *D)
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
A field in a dependent type, known only by its name.
This captures a statement into a function.
Represents a call to an inherited base class constructor from an inheriting constructor.
unsigned path_size() const
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
void setLParenLoc(SourceLocation L)
void setAccessorLoc(SourceLocation L)
void setGotoLoc(SourceLocation L)
static CXXDynamicCastExpr * CreateEmpty(const ASTContext &Context, unsigned pathSize)
unsigned getTotalComponentListNum() const
Return the number of lists derived from the clause expressions.
CXXTemporary * readCXXTemporary()
void setHadMultipleCandidates(bool V)
void setLocation(SourceLocation L)
This represents '#pragma omp single' directive.
Encodes a location in the source.
void setLocation(SourceLocation L)
void setPrevLowerBoundVariable(Expr *PrevLB)
void setIterationVariable(Expr *IV)
This represents 'hint' clause in the '#pragma omp ...' directive.
PseudoObjectExprBitfields PseudoObjectExprBits
Stmt * readSubStmt()
Reads a sub-statement operand during statement reading.
unsigned getNumHandlers() const
void setUpdater(Expr *Updater)
static OMPTaskDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This is a basic class for representing single OpenMP executable directive.
static CXXDependentScopeMemberExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setDoLoc(SourceLocation L)
static CXXConstCastExpr * CreateEmpty(const ASTContext &Context)
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
void setCombinedNextLowerBound(Expr *CombNLB)
void setAtCatchLoc(SourceLocation Loc)
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
void setSourceRange(SourceRange R)
This represents 'schedule' clause in the '#pragma omp ...' directive.
static ObjCAtTryStmt * CreateEmpty(const ASTContext &Context, unsigned NumCatchStmts, bool HasFinally)
void setConstexpr(bool C)
Represents a call to a member function that may be written either with member call syntax (e...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setIdentLoc(SourceLocation L)
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
OpenMPDirectiveKind
OpenMP directives.
LabelDecl - Represents the declaration of a label.
This represents clause 'shared' in the '#pragma omp ...' directives.
void setLabelLoc(SourceLocation L)
void readDeclarationNameInfo(DeclarationNameInfo &NameInfo)
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
A CXXFunctionalCastExpr record.
void setTemporary(CXXTemporary *T)
A FloatingLiteral record.
static ExprWithCleanups * Create(const ASTContext &C, EmptyShell empty, unsigned numObjects)
void setAllEnumCasesCovered()
Set a flag in the SwitchStmt indicating that if the 'switch (X)' is a switch over an enum value then ...
Expr * readSubExpr()
Reads a sub-expression operand during statement reading.
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
void setClassReceiver(TypeSourceInfo *TSInfo)
void setCatchParamDecl(VarDecl *D)
An ObjCEncodeExpr record.
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp taskwait' directive.
An ImaginaryLiteral record.
void setPrivateCopies(ArrayRef< Expr *> PrivateCopies)
Set list of helper expressions, required for generation of private copies of original lastprivate var...
void setConfig(CallExpr *E)
Sets the kernel configuration expression.
void setConditionVariable(const ASTContext &C, VarDecl *V)
This is a basic class for representing single OpenMP clause.
void setIsFreeIvar(bool A)
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>, and corresponding __opencl_atomic_* for OpenCL 2.0.
void readDeclarationNameLoc(DeclarationNameLoc &DNLoc, DeclarationName Name)
Expr * updateInit(const ASTContext &C, unsigned Init, Expr *expr)
Updates the initializer at index Init with the new expression expr, and returns the old expression at...
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
bool isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind)
Checks if the specified directive kind is one of the composite or combined directives that need loop ...
void addDecl(NamedDecl *D)
ObjCProtocolExpr used for protocol expression in Objective-C.
bool isValueDependent() const
isValueDependent - Determines whether this expression is value-dependent (C++ [temp.dep.constexpr]).
void setDecl(ValueDecl *NewD)
void setThrowLoc(SourceLocation Loc)
unsigned getIdx() const
The current position in this record.
void setVarRefs(ArrayRef< Expr *> VL)
Sets the list of variables for this clause.
ASTContext & getContext()
Retrieve the AST context that this AST reader supplements.
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Stmt * getCapturedStmt()
Retrieve the statement being captured.
This represents '#pragma omp target' directive.
static OMPTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static DesignatedInitExpr * CreateEmpty(const ASTContext &C, unsigned NumIndexExprs)
static DeclGroup * Create(ASTContext &C, Decl **Decls, unsigned NumDecls)
static OMPTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setBaseExpr(Stmt *S)
An expression trait intrinsic.
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType)
This represents '#pragma omp ordered' directive.
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
static SizeOfPackExpr * CreateDeserialized(ASTContext &Context, unsigned NumPartialArgs)
This represents '#pragma omp target update' directive.
ObjCBoxedExpr - used for generalized expression boxing.
void VisitOMPClauseWithPreInit(OMPClauseWithPreInit *C)
void setLAngleLoc(SourceLocation Loc)
void sawArrayRangeDesignator(bool ARD=true)
void addArgument(const TemplateArgumentLoc &Loc)
void setCapturedRecordDecl(RecordDecl *D)
Set the record declaration for captured variables.
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
static MemberExpr * Create(const ASTContext &C, Expr *base, bool isarrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, ValueDecl *memberdecl, DeclAccessPair founddecl, DeclarationNameInfo MemberNameInfo, const TemplateArgumentListInfo *targs, QualType ty, ExprValueKind VK, ExprObjectKind OK)
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
A qualified reference to a name whose declaration cannot yet be resolved.
void setRBracketLoc(SourceLocation L)
void readAttributes(AttrVec &Attrs)
Reads attributes from the current stream position, advancing Idx.
CompoundAssignOperator - For compound assignments (e.g.
Expr ** getElements()
Retrieve elements of array of literals.
A POD class for pairing a NamedDecl* with an access specifier.
DeclarationNameLoc - Additional source/type location info for a declaration name. ...
Represents a C11 generic selection.
AddrLabelExpr - The GNU address of label extension, representing &&label.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Represents a template argument.
void setGotoLoc(SourceLocation L)
void setPrevUpperBoundVariable(Expr *PrevUB)
void setCombinedEnsureUpperBound(Expr *CombEUB)
static OMPForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setLocation(SourceLocation L)
NullStmt - This is the null statement ";": C99 6.8.3p3.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
void setCounters(ArrayRef< Expr *> A)
bool isTypeOperand() const
unsigned getNumAssocs() const
Dataflow Directional Tag Classes.
void setExtendingDecl(const ValueDecl *ExtendedBy, unsigned ManglingNumber)
This represents 'device' clause in the '#pragma omp ...' directive.
An IntegerLiteral record.
OMPClauseReader(ASTStmtReader *R, ASTRecordReader &Record)
llvm::BitstreamCursor DeclsCursor
DeclsCursor - This is a cursor to the start of the DECLS_BLOCK block.
void setBuiltinLoc(SourceLocation L)
[C99 6.4.2.2] - A predefined identifier such as func.
A CXXBoolLiteralExpr record.
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
void setCombinedUpperBoundVariable(Expr *CombUB)
void setRParenLoc(SourceLocation L)
static CapturedStmt * CreateDeserialized(const ASTContext &Context, unsigned NumCaptures)
An ExtVectorElementExpr record.
void setLabel(LabelDecl *L)
static OMPTargetTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setTypeInfoAsWritten(TypeSourceInfo *writtenTy)
This represents '#pragma omp section' directive.
void setAtLoc(SourceLocation L)
This represents '#pragma omp teams distribute' directive.
Selector readSelector()
Read a selector from the Record, advancing Idx.
Expr * ReadExpr(ModuleFile &F)
Reads an expression.
void setExprs(const ASTContext &C, ArrayRef< Expr *> Exprs)
void setCollection(Expr *E)
An ObjCIvarRefExpr record.
void setDecl(ObjCIvarDecl *d)
void setFileScope(bool FS)
A runtime availability query.
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
This represents '#pragma omp simd' directive.
void setConstructionKind(ConstructionKind CK)
Represents a 'co_yield' expression.
An ObjCAutoreleasePoolStmt record.
DeclarationName - The name of a declaration.
StmtClass getStmtClass() const
A CharacterLiteral record.
void setCounterValue(Expr *V)
Set the loop counter value for the depend clauses with 'sink|source' kind of dependency.
Represents a C++11 pack expansion that produces a sequence of expressions.
An ObjCStringLiteral record.
A CXXDynamicCastExpr record.
static LambdaExpr * CreateDeserialized(const ASTContext &C, unsigned NumCaptures)
Construct a new lambda expression that will be deserialized from an external source.
static PseudoObjectExpr * Create(const ASTContext &Context, Expr *syntactic, ArrayRef< Expr *> semantic, unsigned resultIndex)
This represents clause 'linear' in the '#pragma omp ...' directives.
void setInstantiationDependent(bool ID)
Set whether this expression is instantiation-dependent or not.
void setEllipsisLoc(SourceLocation L)
A CXXForRangeStmt record.
Kind
The kind of offsetof node we have.
TemplateArgumentLoc readTemplateArgumentLoc()
Reads a TemplateArgumentLoc, advancing Idx.
void setLParenLoc(SourceLocation L)
void setSelector(Selector S)
ExplicitCastExpr - An explicit cast written in the source code.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
void setMethodDecl(ObjCMethodDecl *MD)
This represents '#pragma omp atomic' directive.
void setLocStart(SourceLocation Loc)
Sets the starting location of the clause.
static CompoundStmt * CreateEmpty(const ASTContext &C, unsigned NumStmts)
pack_iterator pack_begin() const
Iterator referencing the first argument of a template argument pack.
static OMPSharedClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
An ObjCAtFinallyStmt record.
VersionTuple readVersionTuple()
Read a version tuple, advancing Idx.
Represents a __leave statement.
unsigned getCollapsedNumber() const
Get number of collapsed loops.
unsigned getNumSubExprs() const
void setRBracketLoc(SourceLocation L)
void setComponentListSizes(ArrayRef< unsigned > CLSs)
Set the cumulative component lists sizes that are in the trailing objects of the class.
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
SwitchStmt - This represents a 'switch' stmt.
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents the body of a coroutine.
TemplateArgumentLoc * getTrailingTemplateArgumentLoc()
Return the optional template arguments.
Location wrapper for a TemplateArgument.
void setConditionVariable(const ASTContext &C, VarDecl *V)
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
static const unsigned NumExprFields
The number of record fields required for the Expr class itself.
void setCatchStmt(unsigned I, ObjCAtCatchStmt *S)
Set a particular catch statement.
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Represents Objective-C's collection statement.
An ObjCAtSynchronizedStmt record.
unsigned getNumObjects() const
void setIndexExpr(unsigned Idx, Expr *E)
ObjCEncodeExpr, used for @encode in Objective-C.
static OMPCopyprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with N variables.
void setLowerBound(Expr *E)
Set lower bound of the array section.
An implicit indirection through a C++ base class, when the field found is in a base class...
static UnresolvedMemberExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
A SizefAlignOfExpr record.
Represents a call to a CUDA kernel function.
Represents a 'co_await' expression.
TypeTraitExprBitfields TypeTraitExprBits
static ImplicitCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
void setSwitchLoc(SourceLocation L)
A CXXMemberCallExpr record.
void setAtFinallyLoc(SourceLocation Loc)
void setArg(unsigned Arg, Expr *ArgExpr)
Set the specified argument.
void setKind(UnaryExprOrTypeTrait K)
void setRParenLoc(SourceLocation L)
void setOperatorLoc(SourceLocation L)
void setValue(const ASTContext &C, const llvm::APFloat &Val)
Represents Objective-C's @finally statement.
void setCatchBody(Stmt *S)
static CXXFunctionalCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
void setLParenLoc(SourceLocation L)
The template argument is actually a parameter pack.
Represents a base class of a C++ class.
This represents 'write' clause in the '#pragma omp atomic' directive.
void setRParenLoc(SourceLocation L)
unsigned getNumClobbers() const
static OMPTargetTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
void setAtSynchronizedLoc(SourceLocation Loc)
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
void setOperatorLoc(SourceLocation L)
void setLocation(SourceLocation Location)
A ConvertVectorExpr record.
unsigned arg_size() const
Retrieve the number of arguments.
void setStarLoc(SourceLocation L)
void setLParenLoc(SourceLocation L)
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
GotoStmt - This represents a direct goto.
A use of a default initializer in a constructor or in aggregate initialization.
static CStyleCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
void setLocation(SourceLocation L)
static UnresolvedLookupExpr * CreateEmpty(const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
CapturedDecl * getCapturedDecl()
Retrieve the outlined function declaration.
void setBuiltinLoc(SourceLocation L)
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
GNU array range designator.
An ArrayInitIndexExpr record.
A GCC-style AsmStmt record.
This represents '#pragma omp target parallel' directive.
This represents 'nowait' clause in the '#pragma omp ...' directive.
void setStrideVariable(Expr *ST)
ContinueStmt - This represents a continue.
static CXXStaticCastExpr * CreateEmpty(const ASTContext &Context, unsigned PathSize)
Represents a loop initializing the elements of an array.
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
static CXXTryStmt * Create(const ASTContext &C, SourceLocation tryLoc, Stmt *tryBlock, ArrayRef< Stmt *> handlers)
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setElseLoc(SourceLocation L)
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
CXXCatchStmt - This represents a C++ catch block.
static CXXUnresolvedConstructExpr * CreateEmpty(const ASTContext &C, unsigned NumArgs)
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
An ObjCAtCatchStmt record.
static TypeTraitExpr * CreateDeserialized(const ASTContext &C, unsigned NumArgs)
Expr * ReadSubExpr()
Reads a sub-expression operand during statement reading.
WhileStmt - This represents a 'while' stmt.
void initializeFrom(SourceLocation TemplateKWLoc, const TemplateArgumentListInfo &List, TemplateArgumentLoc *OutArgArray)
void setIfLoc(SourceLocation L)
Field designator where the field has been resolved to a declaration.
void setIsaMemberLoc(SourceLocation L)
unsigned getNumConcatenated() const
getNumConcatenated - Get the number of string literal tokens that were concatenated in translation ph...
A CXXInheritedCtorInitExpr record.
unsigned kind
All of the diagnostics that can be emitted by the frontend.
void setExprOperand(Expr *E)
Represents Objective-C's @try ... @catch ... @finally statement.
This represents '#pragma omp taskloop simd' directive.
void setTokenLocation(SourceLocation L)
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
unsigned getNumCatchStmts() const
Retrieve the number of @catch statements in this try-catch-finally block.
StringLiteral - This represents a string literal expression, e.g.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
void setPreInitStmt(Stmt *S, OpenMPDirectiveKind ThisRegion=OMPD_unknown)
Set pre-initialization statement for the clause.
llvm::APInt readAPInt()
Read an integral value, advancing Idx.
void setOpLoc(SourceLocation L)
void setLoopVarStmt(Stmt *S)
An object for streaming information from a record.
Internal struct to describes an element that is a pack expansion, used if any of the elements in the ...
void setPreCond(Expr *PC)
RetTy Visit(PTR(Stmt) S, ParamTys... P)
This represents 'dist_schedule' clause in the '#pragma omp ...' directive.
void setRParenLoc(SourceLocation L)
void reserveInits(const ASTContext &C, unsigned NumInits)
Reserve space for some number of initializers.
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
An ObjCMessageExpr record.
static OMPFromClause * CreateEmpty(const ASTContext &C, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
Creates an empty clause with the place for NumVars variables.
Abstract class common to all of the C++ "named"/"keyword" casts.
This represents '#pragma omp sections' directive.
void setNextSwitchCase(SwitchCase *SC)
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
A CompoundAssignOperator record.
unsigned getNumComponents() const
This represents '#pragma omp target data' directive.
void setNextUpperBound(Expr *NUB)
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
void setKind(CharacterKind kind)
A reference to a declared variable, function, enum, etc.
Designator - A designator in a C99 designated initializer.
void setLabel(LabelDecl *D)
Token readToken()
Reads a token out of a record, advancing Idx.
BreakStmt - This represents a break.
void setSubStmt(Stmt *SS)
static ObjCArrayLiteral * CreateEmpty(const ASTContext &C, unsigned NumElements)
unsigned getNumArgs() const
A trivial tuple used to represent a source range.
This represents '#pragma omp taskyield' directive.
NamedDecl - This represents a decl with a name.
This represents '#pragma omp distribute parallel for simd' composite directive.
A boolean literal, per ([C++ lex.bool] Boolean literals).
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
This represents '#pragma omp parallel sections' directive.
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
void setCalcLastIteration(Expr *CLI)
SwitchCase * getSwitchCaseWithID(unsigned ID)
Retrieve the switch-case statement with the given ID.
void setStdInitListInitialization(bool V)
The receiver is a superclass.
static OMPLastprivateClause * CreateEmpty(const ASTContext &C, unsigned N)
Creates an empty clause with the place for N variables.
void setCombinedNextUpperBound(Expr *CombNUB)
SourceLocation getBegin() const
capture_init_iterator capture_init_end()
Retrieve the iterator pointing one past the last initialization argument.
void setLParenLoc(SourceLocation Loc)
Sets the location of '('.
Represents Objective-C's @autoreleasepool Statement.
void setWhileLoc(SourceLocation L)
StmtCode
Record codes for each kind of statement or expression.
void setLocEnd(SourceLocation Loc)
Set ending location of directive.
void setArg(unsigned Arg, Expr *ArgExpr)
setArg - Set the specified argument.
void setFinals(ArrayRef< Expr *> A)
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents an implicitly-generated value initialization of an object of a given type.
void setKeywordLoc(SourceLocation L)
void setCapturedRegionKind(CapturedRegionKind Kind)
Set the captured region kind.
A GenericSelectionExpr record.
This represents '#pragma omp target parallel for' directive.
This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
void setLabelLoc(SourceLocation L)
#define BLOCK(DERIVED, BASE)
void setAtLoc(SourceLocation Loc)
void setIsConditionTrue(bool isTrue)
This represents '#pragma omp taskloop' directive.