24#include "llvm/Bitstream/BitstreamWriter.h"
25#include "llvm/Support/ErrorHandling.h"
28using namespace serialization;
43 bool GeneratingReducedBMI =
false;
48 : Writer(Writer), Context(Context),
Record(Writer,
Record),
49 Code((serialization::
DeclCode)0), AbbrevToUse(0),
50 GeneratingReducedBMI(GeneratingReducedBMI) {}
54 llvm::report_fatal_error(StringRef(
"unexpected declaration kind '") +
56 return Record.Emit(Code, AbbrevToUse);
174 for (
auto *typeParam : *typeParams) {
175 Record.AddDeclRef(typeParam);
185 llvm::MapVector<ModuleFile*, const Decl*> Firsts;
188 if (R->isFromASTFile())
190 else if (IncludeLocal)
193 for (
const auto &F : Firsts)
194 Record.AddDeclRef(F.second);
198 template <
typename EntryType>
207 return Common->PartialSpecializations;
213 template<
typename DeclTy>
215 auto *Common =
D->getCommonPtr();
221 Common->LazySpecializations) {
222 D->LoadLazySpecializations();
223 assert(!Common->LazySpecializations);
227 if (
auto *LS = Common->LazySpecializations)
228 LazySpecializations =
llvm::ArrayRef(LS + 1, LS[0].getRawValue());
231 unsigned I =
Record.size();
237 for (
auto &Entry : Common->Specializations)
242 for (
auto *
D : Specs) {
272 Writer.DeclUpdates[Template].push_back(ASTWriter::DeclUpdate(
279 if (
auto *FD = dyn_cast<FunctionDecl>(
D)) {
280 if (FD->isInlined() || FD->isConstexpr())
283 if (FD->isDependentContext())
290 if (
auto *VD = dyn_cast<VarDecl>(
D)) {
291 if (!VD->getDeclContext()->getRedeclContext()->isFileContext() ||
292 VD->isInline() || VD->isConstexpr() || isa<ParmVarDecl>(VD) ||
296 VD->hasConstantInitialization())
312 if (
auto *DD = dyn_cast<DeclaratorDecl>(
D)) {
313 if (
auto *TInfo = DD->getTypeSourceInfo())
314 Record.AddTypeLoc(TInfo->getTypeLoc());
320 if (
auto *FD = dyn_cast<FunctionDecl>(
D)) {
322 Record.push_back(FD->doesThisDeclarationHaveABody());
323 if (FD->doesThisDeclarationHaveABody())
324 Record.AddFunctionDefinition(FD);
333 if (
auto *VD = dyn_cast<VarDecl>(
D)) {
335 Record.AddVarDeclInit(VD);
342 if (
auto *FD = dyn_cast<FieldDecl>(
D)) {
343 if (FD->hasInClassInitializer()) {
344 if (
Expr *
Init = FD->getInClassInitializer()) {
357 if (
auto *DC = dyn_cast<DeclContext>(
D))
382 Record.push_back(DeclBits);
403 while (
auto *NS = dyn_cast<NamespaceDecl>(DC->getRedeclContext())) {
404 if (!NS->isFromASTFile())
406 Writer.UpdatedDeclContexts.insert(NS->getPrimaryContext());
407 if (!NS->isInlineNamespace())
409 DC = NS->getParent();
415 StringRef Arg =
D->getArg();
416 Record.push_back(Arg.size());
419 Record.push_back(
D->getCommentKind());
426 StringRef Name =
D->getName();
427 StringRef
Value =
D->getValue();
437 llvm_unreachable(
"Translation units aren't directly serialized");
442 Record.AddDeclarationName(
D->getDeclName());
457 Record.AddTypeSourceInfo(
D->getTypeSourceInfo());
458 Record.push_back(
D->isModed());
460 Record.AddTypeRef(
D->getUnderlyingType());
461 Record.AddDeclRef(
D->getAnonDeclWithTypedefName(
false));
482 Record.AddDeclRef(
D->getDescribedAliasTemplate());
487 static_assert(DeclContext::NumTagDeclBits == 23,
488 "You need to update the serializer after you change the "
496 TagDeclBits.
addBits(llvm::to_underlying(
D->getTagKind()), 3);
497 TagDeclBits.
addBit(!isa<CXXRecordDecl>(
D) ?
D->isCompleteDefinition() : 0);
498 TagDeclBits.
addBit(
D->isEmbeddedInDeclarator());
499 TagDeclBits.
addBit(
D->isFreeStanding());
500 TagDeclBits.
addBit(
D->isCompleteDefinitionRequired());
502 D->hasExtInfo() ? 1 : (
D->getTypedefNameForAnonDecl() ? 2 : 0),
504 Record.push_back(TagDeclBits);
506 Record.AddSourceRange(
D->getBraceRange());
508 if (
D->hasExtInfo()) {
509 Record.AddQualifierInfo(*
D->getExtInfo());
510 }
else if (
auto *TD =
D->getTypedefNameForAnonDecl()) {
512 Record.AddIdentifierRef(TD->getDeclName().getAsIdentifierInfo());
517 static_assert(DeclContext::NumEnumDeclBits == 43,
518 "You need to update the serializer after you change the "
522 Record.AddTypeSourceInfo(
D->getIntegerTypeSourceInfo());
523 if (!
D->getIntegerTypeSourceInfo())
524 Record.AddTypeRef(
D->getIntegerType());
525 Record.AddTypeRef(
D->getPromotionType());
528 EnumDeclBits.
addBits(
D->getNumPositiveBits(), 8);
529 EnumDeclBits.
addBits(
D->getNumNegativeBits(), 8);
530 EnumDeclBits.
addBit(
D->isScoped());
531 EnumDeclBits.
addBit(
D->isScopedUsingClassTag());
532 EnumDeclBits.
addBit(
D->isFixed());
533 Record.push_back(EnumDeclBits);
535 Record.push_back(
D->getODRHash());
538 Record.AddDeclRef(MemberInfo->getInstantiatedFrom());
539 Record.push_back(MemberInfo->getTemplateSpecializationKind());
540 Record.AddSourceLocation(MemberInfo->getPointOfInstantiation());
542 Record.AddDeclRef(
nullptr);
547 !
D->getTypedefNameForAnonDecl() &&
551 !
D->getIntegerTypeSourceInfo() && !
D->getMemberSpecializationInfo() &&
560 static_assert(DeclContext::NumRecordDeclBits == 64,
561 "You need to update the serializer after you change the "
567 RecordDeclBits.
addBit(
D->hasFlexibleArrayMember());
568 RecordDeclBits.
addBit(
D->isAnonymousStructOrUnion());
569 RecordDeclBits.
addBit(
D->hasObjectMember());
570 RecordDeclBits.
addBit(
D->hasVolatileMember());
571 RecordDeclBits.
addBit(
D->isNonTrivialToPrimitiveDefaultInitialize());
572 RecordDeclBits.
addBit(
D->isNonTrivialToPrimitiveCopy());
573 RecordDeclBits.
addBit(
D->isNonTrivialToPrimitiveDestroy());
574 RecordDeclBits.
addBit(
D->hasNonTrivialToPrimitiveDefaultInitializeCUnion());
575 RecordDeclBits.
addBit(
D->hasNonTrivialToPrimitiveDestructCUnion());
576 RecordDeclBits.
addBit(
D->hasNonTrivialToPrimitiveCopyCUnion());
577 RecordDeclBits.
addBit(
D->isParamDestroyedInCallee());
578 RecordDeclBits.
addBits(llvm::to_underlying(
D->getArgPassingRestrictions()), 2);
579 Record.push_back(RecordDeclBits);
583 if (!isa<CXXRecordDecl>(
D))
584 Record.push_back(
D->getODRHash());
588 !
D->getTypedefNameForAnonDecl() &&
601 Record.AddTypeRef(
D->getType());
606 Record.push_back(
D->getInitExpr()? 1 : 0);
607 if (
D->getInitExpr())
608 Record.AddStmt(
D->getInitExpr());
609 Record.AddAPSInt(
D->getInitVal());
616 Record.AddSourceLocation(
D->getInnerLocStart());
617 Record.push_back(
D->hasExtInfo());
618 if (
D->hasExtInfo()) {
619 DeclaratorDecl::ExtInfo *Info =
D->getExtInfo();
620 Record.AddQualifierInfo(*Info);
621 Record.AddStmt(Info->TrailingRequiresClause);
624 Record.AddTypeRef(
D->getTypeSourceInfo() ?
D->getTypeSourceInfo()->getType()
629 static_assert(DeclContext::NumFunctionDeclBits == 44,
630 "You need to update the serializer after you change the "
635 Record.push_back(
D->getTemplatedKind());
636 switch (
D->getTemplatedKind()) {
640 Record.AddDeclRef(
D->getInstantiatedFromDecl());
643 Record.AddDeclRef(
D->getDescribedFunctionTemplate());
654 FTSInfo =
D->getTemplateSpecializationInfo();
667 Record.AddASTTemplateArgumentListInfo(
675 Record.AddDeclRef(MemberInfo->getInstantiatedFrom());
676 Record.push_back(MemberInfo->getTemplateSpecializationKind());
677 Record.AddSourceLocation(MemberInfo->getPointOfInstantiation());
691 DFTSInfo =
D->getDependentSpecializationInfo();
701 Record.AddASTTemplateArgumentListInfo(
708 Record.AddDeclarationNameLoc(
D->DNLoc,
D->getDeclName());
716 FunctionDeclBits.
addBits(llvm::to_underlying(
D->getLinkageInternal()), 3);
717 FunctionDeclBits.
addBits((uint32_t)
D->getStorageClass(), 3);
718 FunctionDeclBits.
addBit(
D->isInlineSpecified());
719 FunctionDeclBits.
addBit(
D->isInlined());
720 FunctionDeclBits.
addBit(
D->hasSkippedBody());
721 FunctionDeclBits.
addBit(
D->isVirtualAsWritten());
722 FunctionDeclBits.
addBit(
D->isPureVirtual());
723 FunctionDeclBits.
addBit(
D->hasInheritedPrototype());
724 FunctionDeclBits.
addBit(
D->hasWrittenPrototype());
725 FunctionDeclBits.
addBit(
D->isDeletedBit());
726 FunctionDeclBits.
addBit(
D->isTrivial());
727 FunctionDeclBits.
addBit(
D->isTrivialForCall());
728 FunctionDeclBits.
addBit(
D->isDefaulted());
729 FunctionDeclBits.
addBit(
D->isExplicitlyDefaulted());
730 FunctionDeclBits.
addBit(
D->isIneligibleOrNotSelected());
731 FunctionDeclBits.
addBits((uint64_t)(
D->getConstexprKind()), 2);
732 FunctionDeclBits.
addBit(
D->hasImplicitReturnZero());
733 FunctionDeclBits.
addBit(
D->isMultiVersion());
734 FunctionDeclBits.
addBit(
D->isLateTemplateParsed());
735 FunctionDeclBits.
addBit(
D->FriendConstraintRefersToEnclosingTemplate());
736 FunctionDeclBits.
addBit(
D->usesSEHTry());
737 Record.push_back(FunctionDeclBits);
740 if (
D->isExplicitlyDefaulted())
741 Record.AddSourceLocation(
D->getDefaultLoc());
743 Record.push_back(
D->getODRHash());
745 if (
D->isDefaulted() ||
D->isDeletedAsWritten()) {
746 if (
auto *FDI =
D->getDefalutedOrDeletedInfo()) {
750 Record.push_back(1 | (DeletedMessage ? 2 : 0));
752 Record.AddStmt(DeletedMessage);
754 Record.push_back(FDI->getUnqualifiedLookups().size());
756 Record.AddDeclRef(
P.getDecl());
757 Record.push_back(
P.getAccess());
764 Record.push_back(
D->param_size());
765 for (
auto *
P :
D->parameters())
772 uint64_t Kind =
static_cast<uint64_t
>(ES.
getKind());
773 Kind = Kind << 1 | static_cast<bool>(ES.
getExpr());
784 Record.push_back(
static_cast<unsigned char>(
D->getDeductionCandidateKind()));
789 static_assert(DeclContext::NumObjCMethodDeclBits == 37,
790 "You need to update the serializer after you change the "
791 "ObjCMethodDeclBits");
796 bool HasBodyStuff =
D->
getBody() !=
nullptr;
797 Record.push_back(HasBodyStuff);
801 Record.AddDeclRef(
D->getSelfDecl());
802 Record.AddDeclRef(
D->getCmdDecl());
803 Record.push_back(
D->isInstanceMethod());
804 Record.push_back(
D->isVariadic());
805 Record.push_back(
D->isPropertyAccessor());
806 Record.push_back(
D->isSynthesizedAccessorStub());
807 Record.push_back(
D->isDefined());
808 Record.push_back(
D->isOverriding());
809 Record.push_back(
D->hasSkippedBody());
811 Record.push_back(
D->isRedeclaration());
812 Record.push_back(
D->hasRedeclaration());
813 if (
D->hasRedeclaration()) {
819 Record.push_back(llvm::to_underlying(
D->getImplementationControl()));
821 Record.push_back(
D->getObjCDeclQualifier());
822 Record.push_back(
D->hasRelatedResultType());
823 Record.AddTypeRef(
D->getReturnType());
824 Record.AddTypeSourceInfo(
D->getReturnTypeSourceInfo());
826 Record.push_back(
D->param_size());
827 for (
const auto *
P :
D->parameters())
830 Record.push_back(
D->getSelLocsKind());
831 unsigned NumStoredSelLocs =
D->getNumStoredSelLocs();
833 Record.push_back(NumStoredSelLocs);
834 for (
unsigned i = 0; i != NumStoredSelLocs; ++i)
835 Record.AddSourceLocation(SelLocs[i]);
844 Record.AddSourceLocation(
D->VarianceLoc);
845 Record.AddSourceLocation(
D->ColonLoc);
851 static_assert(DeclContext::NumObjCContainerDeclBits == 64,
852 "You need to update the serializer after you change the "
853 "ObjCContainerDeclBits");
856 Record.AddSourceLocation(
D->getAtStartLoc());
857 Record.AddSourceRange(
D->getAtEndRange());
867 Record.push_back(
D->isThisDeclarationADefinition());
868 if (
D->isThisDeclarationADefinition()) {
870 ObjCInterfaceDecl::DefinitionData &
Data =
D->data();
872 Record.AddTypeSourceInfo(
D->getSuperClassTInfo());
873 Record.AddSourceLocation(
D->getEndOfDefinitionLoc());
874 Record.push_back(
Data.HasDesignatedInitializers);
875 Record.push_back(
D->getODRHash());
878 Record.push_back(
Data.ReferencedProtocols.size());
879 for (
const auto *
P :
D->protocols())
881 for (
const auto &PL :
D->protocol_locs())
882 Record.AddSourceLocation(PL);
885 Record.push_back(
Data.AllReferencedProtocols.size());
887 P =
Data.AllReferencedProtocols.begin(),
888 PEnd =
Data.AllReferencedProtocols.end();
895 Writer.ObjCClassesWithCategories.insert(
D);
898 for (; Cat; Cat = Cat->getNextClassCategoryRaw())
909 Record.push_back(
D->getAccessControl());
910 Record.push_back(
D->getSynthesize());
931 Record.push_back(
D->isThisDeclarationADefinition());
932 if (
D->isThisDeclarationADefinition()) {
933 Record.push_back(
D->protocol_size());
934 for (
const auto *I :
D->protocols())
936 for (
const auto &PL :
D->protocol_locs())
937 Record.AddSourceLocation(PL);
938 Record.push_back(
D->getODRHash());
951 Record.AddSourceLocation(
D->getCategoryNameLoc());
952 Record.AddSourceLocation(
D->getIvarLBraceLoc());
953 Record.AddSourceLocation(
D->getIvarRBraceLoc());
954 Record.AddDeclRef(
D->getClassInterface());
956 Record.push_back(
D->protocol_size());
957 for (
const auto *I :
D->protocols())
959 for (
const auto &PL :
D->protocol_locs())
960 Record.AddSourceLocation(PL);
966 Record.AddDeclRef(
D->getClassInterface());
972 Record.AddSourceLocation(
D->getAtLoc());
973 Record.AddSourceLocation(
D->getLParenLoc());
974 Record.AddTypeRef(
D->getType());
975 Record.AddTypeSourceInfo(
D->getTypeSourceInfo());
977 Record.push_back((
unsigned)
D->getPropertyAttributes());
978 Record.push_back((
unsigned)
D->getPropertyAttributesAsWritten());
980 Record.push_back((
unsigned)
D->getPropertyImplementation());
981 Record.AddDeclarationName(
D->getGetterName());
982 Record.AddSourceLocation(
D->getGetterNameLoc());
983 Record.AddDeclarationName(
D->getSetterName());
984 Record.AddSourceLocation(
D->getSetterNameLoc());
985 Record.AddDeclRef(
D->getGetterMethodDecl());
986 Record.AddDeclRef(
D->getSetterMethodDecl());
987 Record.AddDeclRef(
D->getPropertyIvarDecl());
993 Record.AddDeclRef(
D->getClassInterface());
999 Record.AddSourceLocation(
D->getCategoryNameLoc());
1005 Record.AddDeclRef(
D->getSuperClass());
1006 Record.AddSourceLocation(
D->getSuperClassLoc());
1007 Record.AddSourceLocation(
D->getIvarLBraceLoc());
1008 Record.AddSourceLocation(
D->getIvarRBraceLoc());
1009 Record.push_back(
D->hasNonZeroConstructors());
1010 Record.push_back(
D->hasDestructors());
1011 Record.push_back(
D->NumIvarInitializers);
1012 if (
D->NumIvarInitializers)
1013 Record.AddCXXCtorInitializers(
1021 Record.AddDeclRef(
D->getPropertyDecl());
1022 Record.AddDeclRef(
D->getPropertyIvarDecl());
1023 Record.AddSourceLocation(
D->getPropertyIvarDeclLoc());
1024 Record.AddDeclRef(
D->getGetterMethodDecl());
1025 Record.AddDeclRef(
D->getSetterMethodDecl());
1026 Record.AddStmt(
D->getGetterCXXConstructor());
1027 Record.AddStmt(
D->getSetterCXXAssignment());
1033 Record.push_back(
D->isMutable());
1035 Record.push_back((
D->StorageKind << 1) |
D->BitField);
1036 if (
D->StorageKind == FieldDecl::ISK_CapturedVLAType)
1038 else if (
D->BitField)
1039 Record.AddStmt(
D->getBitWidth());
1041 if (!
D->getDeclName())
1052 !
D->getBitWidth() &&
1053 !
D->hasInClassInitializer() &&
1054 !
D->hasCapturedVLAType() &&
1066 Record.AddIdentifierRef(
D->getGetterId());
1067 Record.AddIdentifierRef(
D->getSetterId());
1084 Record.AddAPValue(
D->getValue());
1090 Record.AddAPValue(
D->getValue());
1096 Record.push_back(
D->getChainingSize());
1098 for (
const auto *
P :
D->chain())
1111 VarDeclBits.
addBits(llvm::to_underlying(
D->getLinkageInternal()),
1114 bool ModulesCodegen =
false;
1115 if (Writer.WritingModule &&
D->getStorageDuration() ==
SD_Static &&
1116 !
D->getDescribedVarTemplate()) {
1124 Writer.Context->
getLangOpts().BuildingPCHWithObjectFile)) &&
1127 VarDeclBits.
addBit(ModulesCodegen);
1129 VarDeclBits.
addBits(
D->getStorageClass(), 3);
1130 VarDeclBits.
addBits(
D->getTSCSpec(), 2);
1131 VarDeclBits.
addBits(
D->getInitStyle(), 2);
1132 VarDeclBits.
addBit(
D->isARCPseudoStrong());
1134 bool HasDeducedType =
false;
1135 if (!isa<ParmVarDecl>(
D)) {
1136 VarDeclBits.
addBit(
D->isThisDeclarationADemotedDefinition());
1137 VarDeclBits.
addBit(
D->isExceptionVariable());
1138 VarDeclBits.
addBit(
D->isNRVOVariable());
1139 VarDeclBits.
addBit(
D->isCXXForRangeDecl());
1141 VarDeclBits.
addBit(
D->isInline());
1142 VarDeclBits.
addBit(
D->isInlineSpecified());
1143 VarDeclBits.
addBit(
D->isConstexpr());
1144 VarDeclBits.
addBit(
D->isInitCapture());
1145 VarDeclBits.
addBit(
D->isPreviousDeclInSameBlockScope());
1147 VarDeclBits.
addBit(
D->isEscapingByref());
1148 HasDeducedType =
D->getType()->getContainedDeducedType();
1149 VarDeclBits.
addBit(HasDeducedType);
1151 if (
const auto *IPD = dyn_cast<ImplicitParamDecl>(
D))
1152 VarDeclBits.
addBits(llvm::to_underlying(IPD->getParameterKind()),
1157 VarDeclBits.
addBit(
D->isObjCForDecl());
1160 Record.push_back(VarDeclBits);
1168 if (
Init.getCopyExpr())
1173 VarNotTemplate = 0, VarTemplate, StaticDataMemberSpecialization
1176 Record.push_back(VarTemplate);
1177 Record.AddDeclRef(TemplD);
1179 =
D->getMemberSpecializationInfo()) {
1180 Record.push_back(StaticDataMemberSpecialization);
1181 Record.AddDeclRef(SpecInfo->getInstantiatedFrom());
1182 Record.push_back(SpecInfo->getTemplateSpecializationKind());
1183 Record.AddSourceLocation(SpecInfo->getPointOfInstantiation());
1185 Record.push_back(VarNotTemplate);
1193 D->
getKind() == Decl::Var && !
D->isInline() && !
D->isConstexpr() &&
1194 !
D->isInitCapture() && !
D->isPreviousDeclInSameBlockScope() &&
1195 !
D->isEscapingByref() && !HasDeducedType &&
1196 D->getStorageDuration() !=
SD_Static && !
D->getDescribedVarTemplate() &&
1197 !
D->getMemberSpecializationInfo() && !
D->isObjCForDecl() &&
1198 !isa<ImplicitParamDecl>(
D) && !
D->isEscapingByref())
1215 Record.push_back(
D->getFunctionScopeIndex());
1218 ParmVarDeclBits.
addBit(
D->isObjCMethodParameter());
1219 ParmVarDeclBits.
addBits(
D->getFunctionScopeDepth(), 7);
1221 ParmVarDeclBits.
addBits(
D->getObjCDeclQualifier(), 7);
1222 ParmVarDeclBits.
addBit(
D->isKNRPromoted());
1223 ParmVarDeclBits.
addBit(
D->hasInheritedDefaultArg());
1224 ParmVarDeclBits.
addBit(
D->hasUninstantiatedDefaultArg());
1225 ParmVarDeclBits.
addBit(
D->getExplicitObjectParamThisLoc().isValid());
1226 Record.push_back(ParmVarDeclBits);
1228 if (
D->hasUninstantiatedDefaultArg())
1229 Record.AddStmt(
D->getUninstantiatedDefaultArg());
1230 if (
D->getExplicitObjectParamThisLoc().isValid())
1231 Record.AddSourceLocation(
D->getExplicitObjectParamThisLoc());
1241 D->getInit() ==
nullptr)
1246 assert(!
D->getTSCSpec() &&
"PARM_VAR_DECL can't use TLS");
1247 assert(!
D->isThisDeclarationADemotedDefinition()
1248 &&
"PARM_VAR_DECL can't be demoted definition.");
1250 assert(!
D->isExceptionVariable() &&
"PARM_VAR_DECL can't be exception var");
1251 assert(
D->
getPreviousDecl() ==
nullptr &&
"PARM_VAR_DECL can't be redecl");
1252 assert(!
D->isStaticDataMember() &&
1253 "PARM_VAR_DECL can't be static data member");
1258 Record.push_back(
D->bindings().size());
1261 for (
auto *B :
D->bindings())
1268 Record.AddStmt(
D->getBinding());
1274 Record.AddStmt(
D->getAsmString());
1275 Record.AddSourceLocation(
D->getRParenLoc());
1293 Record.AddDeclRef(
D->getExtendingDecl());
1294 Record.AddStmt(
D->getTemporaryExpr());
1295 Record.push_back(
static_cast<bool>(
D->getValue()));
1297 Record.AddAPValue(*
D->getValue());
1298 Record.push_back(
D->getManglingNumber());
1304 Record.AddTypeSourceInfo(
D->getSignatureAsWritten());
1305 Record.push_back(
D->param_size());
1308 Record.push_back(
D->isVariadic());
1309 Record.push_back(
D->blockMissingReturnType());
1310 Record.push_back(
D->isConversionFromLambda());
1311 Record.push_back(
D->doesNotEscape());
1312 Record.push_back(
D->canAvoidCopyToHeap());
1313 Record.push_back(
D->capturesCXXThis());
1314 Record.push_back(
D->getNumCaptures());
1315 for (
const auto &capture :
D->captures()) {
1316 Record.AddDeclRef(capture.getVariable());
1319 if (capture.isByRef()) flags |= 1;
1320 if (capture.isNested()) flags |= 2;
1321 if (capture.hasCopyExpr()) flags |= 4;
1324 if (capture.hasCopyExpr())
Record.AddStmt(capture.getCopyExpr());
1342 static_assert(DeclContext::NumLinkageSpecDeclBits == 17,
1343 "You need to update the serializer after you change the"
1344 "LinkageSpecDeclBits");
1347 Record.push_back(llvm::to_underlying(
D->getLanguage()));
1348 Record.AddSourceLocation(
D->getExternLoc());
1349 Record.AddSourceLocation(
D->getRBraceLoc());
1355 Record.AddSourceLocation(
D->getRBraceLoc());
1371 NamespaceDeclBits.
addBit(
D->isInline());
1372 NamespaceDeclBits.
addBit(
D->isNested());
1373 Record.push_back(NamespaceDeclBits);
1376 Record.AddSourceLocation(
D->getRBraceLoc());
1379 Record.AddDeclRef(
D->getAnonymousNamespace());
1382 if (Writer.
hasChain() &&
D->isAnonymousNamespace() &&
1389 D->getParent()->getRedeclContext()->getPrimaryContext());
1390 if (
Parent->isFromASTFile() || isa<TranslationUnitDecl>(
Parent)) {
1391 Writer.DeclUpdates[
Parent].push_back(
1400 Record.AddSourceLocation(
D->getNamespaceLoc());
1401 Record.AddSourceLocation(
D->getTargetNameLoc());
1402 Record.AddNestedNameSpecifierLoc(
D->getQualifierLoc());
1403 Record.AddDeclRef(
D->getNamespace());
1409 Record.AddSourceLocation(
D->getUsingLoc());
1410 Record.AddNestedNameSpecifierLoc(
D->getQualifierLoc());
1411 Record.AddDeclarationNameLoc(
D->DNLoc,
D->getDeclName());
1412 Record.AddDeclRef(
D->FirstUsingShadow.getPointer());
1413 Record.push_back(
D->hasTypename());
1420 Record.AddSourceLocation(
D->getUsingLoc());
1421 Record.AddSourceLocation(
D->getEnumLoc());
1422 Record.AddTypeSourceInfo(
D->getEnumType());
1423 Record.AddDeclRef(
D->FirstUsingShadow.getPointer());
1429 Record.push_back(
D->NumExpansions);
1431 Record.AddDeclRef(
D->getInstantiatedFromUsingDecl());
1432 for (
auto *
E :
D->expansions())
1440 Record.AddDeclRef(
D->getTargetDecl());
1442 Record.AddDeclRef(
D->UsingOrNextShadow);
1457 Record.AddDeclRef(
D->NominatedBaseClassShadowDecl);
1458 Record.AddDeclRef(
D->ConstructedBaseClassShadowDecl);
1459 Record.push_back(
D->IsVirtual);
1465 Record.AddSourceLocation(
D->getUsingLoc());
1466 Record.AddSourceLocation(
D->getNamespaceKeyLocation());
1467 Record.AddNestedNameSpecifierLoc(
D->getQualifierLoc());
1468 Record.AddDeclRef(
D->getNominatedNamespace());
1469 Record.AddDeclRef(dyn_cast<Decl>(
D->getCommonAncestor()));
1475 Record.AddSourceLocation(
D->getUsingLoc());
1476 Record.AddNestedNameSpecifierLoc(
D->getQualifierLoc());
1477 Record.AddDeclarationNameLoc(
D->DNLoc,
D->getDeclName());
1478 Record.AddSourceLocation(
D->getEllipsisLoc());
1485 Record.AddSourceLocation(
D->getTypenameLoc());
1486 Record.AddNestedNameSpecifierLoc(
D->getQualifierLoc());
1487 Record.AddSourceLocation(
D->getEllipsisLoc());
1501 CXXRecNotTemplate = 0,
1503 CXXRecMemberSpecialization,
1507 Record.push_back(CXXRecTemplate);
1508 Record.AddDeclRef(TemplD);
1510 =
D->getMemberSpecializationInfo()) {
1511 Record.push_back(CXXRecMemberSpecialization);
1512 Record.AddDeclRef(MSInfo->getInstantiatedFrom());
1513 Record.push_back(MSInfo->getTemplateSpecializationKind());
1514 Record.AddSourceLocation(MSInfo->getPointOfInstantiation());
1515 }
else if (
D->isLambda()) {
1517 Record.push_back(CXXLambda);
1518 if (
auto *Context =
D->getLambdaContextDecl()) {
1519 Record.AddDeclRef(Context);
1520 Record.push_back(
D->getLambdaIndexInContext());
1525 Record.push_back(CXXRecNotTemplate);
1528 Record.push_back(
D->isThisDeclarationADefinition());
1529 if (
D->isThisDeclarationADefinition())
1530 Record.AddCXXDefinitionData(
D);
1540 if (
D->isCompleteDefinition())
1549 Record.push_back(
D->size_overridden_methods());
1561 !
D->hasExtInfo() && !
D->isExplicitlyDefaulted()) {
1567 else if (
D->getTemplatedKind() ==
1570 D->getTemplateSpecializationInfo();
1579 }
else if (
D->getTemplatedKind() ==
1582 D->getDependentSpecializationInfo();
1592 static_assert(DeclContext::NumCXXConstructorDeclBits == 64,
1593 "You need to update the serializer after you change the "
1594 "CXXConstructorDeclBits");
1596 Record.push_back(
D->getTrailingAllocKind());
1598 if (
auto Inherited =
D->getInheritedConstructor()) {
1599 Record.AddDeclRef(Inherited.getShadowDecl());
1600 Record.AddDeclRef(Inherited.getConstructor());
1610 Record.AddDeclRef(
D->getOperatorDelete());
1611 if (
D->getOperatorDelete())
1612 Record.AddStmt(
D->getOperatorDeleteThisArg());
1625 Record.push_back(Writer.getSubmoduleID(
D->getImportedModule()));
1627 Record.push_back(!IdentifierLocs.empty());
1628 if (IdentifierLocs.empty()) {
1632 for (
unsigned I = 0, N = IdentifierLocs.size(); I != N; ++I)
1633 Record.AddSourceLocation(IdentifierLocs[I]);
1634 Record.push_back(IdentifierLocs.size());
1643 Record.AddSourceLocation(
D->getColonLoc());
1650 Record.push_back(
D->NumTPLists);
1652 bool hasFriendDecl =
D->Friend.is<
NamedDecl*>();
1653 Record.push_back(hasFriendDecl);
1655 Record.AddDeclRef(
D->getFriendDecl());
1657 Record.AddTypeSourceInfo(
D->getFriendType());
1658 for (
unsigned i = 0; i <
D->NumTPLists; ++i)
1659 Record.AddTemplateParameterList(
D->getFriendTypeTemplateParameterList(i));
1660 Record.AddDeclRef(
D->getNextFriend());
1661 Record.push_back(
D->UnsupportedFriend);
1662 Record.AddSourceLocation(
D->FriendLoc);
1663 Record.AddSourceLocation(
D->EllipsisLoc);
1669 Record.push_back(
D->getNumTemplateParameters());
1670 for (
unsigned i = 0, e =
D->getNumTemplateParameters(); i != e; ++i)
1671 Record.AddTemplateParameterList(
D->getTemplateParameterList(i));
1672 Record.push_back(
D->getFriendDecl() !=
nullptr);
1673 if (
D->getFriendDecl())
1674 Record.AddDeclRef(
D->getFriendDecl());
1676 Record.AddTypeSourceInfo(
D->getFriendType());
1677 Record.AddSourceLocation(
D->getFriendLoc());
1684 Record.AddTemplateParameterList(
D->getTemplateParameters());
1685 Record.AddDeclRef(
D->getTemplatedDecl());
1690 Record.AddStmt(
D->getConstraintExpr());
1696 Record.push_back(
D->getTemplateArguments().size());
1699 Record.AddTemplateArgument(Arg);
1714 Record.AddDeclRef(
D->getInstantiatedFromMemberTemplate());
1715 if (
D->getInstantiatedFromMemberTemplate())
1716 Record.push_back(
D->isMemberSpecialization());
1748 =
D->getSpecializedTemplateOrPartial();
1750 Record.AddDeclRef(InstFromD);
1753 Record.AddTemplateArgumentList(&
D->getTemplateInstantiationArgs());
1756 Record.AddTemplateArgumentList(&
D->getTemplateArgs());
1757 Record.AddSourceLocation(
D->getPointOfInstantiation());
1758 Record.push_back(
D->getSpecializationKind());
1766 bool ExplicitInstantiation =
1767 D->getTemplateSpecializationKind() ==
1770 Record.push_back(ExplicitInstantiation);
1771 if (ExplicitInstantiation) {
1772 Record.AddSourceLocation(
D->getExternKeywordLoc());
1773 Record.AddSourceLocation(
D->getTemplateKeywordLoc());
1777 D->getTemplateArgsAsWritten();
1778 Record.push_back(!!ArgsWritten);
1780 Record.AddASTTemplateArgumentListInfo(ArgsWritten);
1787 Record.AddTemplateParameterList(
D->getTemplateParameters());
1793 Record.AddDeclRef(
D->getInstantiatedFromMember());
1794 Record.push_back(
D->isMemberSpecialization());
1812 llvm::PointerUnion<VarTemplateDecl *, VarTemplatePartialSpecializationDecl *>
1813 InstFrom =
D->getSpecializedTemplateOrPartial();
1815 Record.AddDeclRef(InstFromD);
1818 Record.AddTemplateArgumentList(&
D->getTemplateInstantiationArgs());
1821 bool ExplicitInstantiation =
1822 D->getTemplateSpecializationKind() ==
1825 Record.push_back(ExplicitInstantiation);
1826 if (ExplicitInstantiation) {
1827 Record.AddSourceLocation(
D->getExternKeywordLoc());
1828 Record.AddSourceLocation(
D->getTemplateKeywordLoc());
1832 D->getTemplateArgsAsWritten();
1833 Record.push_back(!!ArgsWritten);
1835 Record.AddASTTemplateArgumentListInfo(ArgsWritten);
1837 Record.AddTemplateArgumentList(&
D->getTemplateArgs());
1838 Record.AddSourceLocation(
D->getPointOfInstantiation());
1839 Record.push_back(
D->getSpecializationKind());
1840 Record.push_back(
D->IsCompleteDefinition);
1856 Record.AddTemplateParameterList(
D->getTemplateParameters());
1862 Record.AddDeclRef(
D->getInstantiatedFromMember());
1863 Record.push_back(
D->isMemberSpecialization());
1878 Record.push_back(
D->hasTypeConstraint());
1881 Record.push_back(
D->wasDeclaredWithTypename());
1884 assert((
bool)TC ==
D->hasTypeConstraint());
1887 Record.push_back(CR !=
nullptr);
1889 Record.AddConceptReference(CR);
1891 Record.push_back(
D->isExpandedParameterPack());
1892 if (
D->isExpandedParameterPack())
1893 Record.push_back(
D->getNumExpansionParameters());
1896 bool OwnsDefaultArg =
D->hasDefaultArgument() &&
1897 !
D->defaultArgumentWasInherited();
1898 Record.push_back(OwnsDefaultArg);
1900 Record.AddTemplateArgumentLoc(
D->getDefaultArgument());
1902 if (!TC && !OwnsDefaultArg &&
1918 if (
D->isExpandedParameterPack())
1919 Record.push_back(
D->getNumExpansionTypes());
1923 Record.push_back(
D->getDepth());
1924 Record.push_back(
D->getPosition());
1928 if (
D->isExpandedParameterPack()) {
1929 for (
unsigned I = 0, N =
D->getNumExpansionTypes(); I != N; ++I) {
1930 Record.AddTypeRef(
D->getExpansionType(I));
1931 Record.AddTypeSourceInfo(
D->getExpansionTypeSourceInfo(I));
1938 bool OwnsDefaultArg =
D->hasDefaultArgument() &&
1939 !
D->defaultArgumentWasInherited();
1940 Record.push_back(OwnsDefaultArg);
1942 Record.AddTemplateArgumentLoc(
D->getDefaultArgument());
1951 if (
D->isExpandedParameterPack())
1952 Record.push_back(
D->getNumExpansionTemplateParameters());
1955 Record.push_back(
D->wasDeclaredWithTypename());
1957 Record.push_back(
D->getDepth());
1958 Record.push_back(
D->getPosition());
1960 if (
D->isExpandedParameterPack()) {
1961 for (
unsigned I = 0, N =
D->getNumExpansionTemplateParameters();
1963 Record.AddTemplateParameterList(
D->getExpansionTemplateParameters(I));
1968 bool OwnsDefaultArg =
D->hasDefaultArgument() &&
1969 !
D->defaultArgumentWasInherited();
1970 Record.push_back(OwnsDefaultArg);
1972 Record.AddTemplateArgumentLoc(
D->getDefaultArgument());
1984 Record.AddStmt(
D->getAssertExpr());
1985 Record.push_back(
D->isFailed());
1986 Record.AddStmt(
D->getMessage());
1987 Record.AddSourceLocation(
D->getRParenLoc());
1993 static_assert(DeclContext::NumDeclContextBits == 13,
1994 "You need to update the serializer after you change the "
1997 uint64_t LexicalOffset = 0;
1998 uint64_t VisibleOffset = 0;
2001 cast<NamespaceDecl>(DC)->isFromExplicitGlobalModule()) {
2005 Writer.DelayedNamespace.push_back(cast<NamespaceDecl>(DC));
2007 LexicalOffset = Writer.WriteDeclContextLexicalBlock(Context, DC);
2008 VisibleOffset = Writer.WriteDeclContextVisibleBlock(Context, DC);
2011 Record.AddOffset(LexicalOffset);
2012 Record.AddOffset(VisibleOffset);
2016 assert(
IsLocalDecl(
D) &&
"expected a local declaration");
2022 const Decl *&CacheEntry = FirstLocalDeclCache[Canon];
2029 return CacheEntry =
D;
2032template <
typename T>
2035 T *MostRecent =
First->getMostRecentDecl();
2036 T *DAsT =
static_cast<T *
>(
D);
2037 if (MostRecent !=
First) {
2039 "Not considered redeclarable?");
2046 if (DAsT == FirstLocal) {
2050 unsigned I =
Record.size();
2063 if (!Prev->isFromASTFile())
2068 if (LocalRedecls.empty())
2074 Record.AddDeclRef(FirstLocal);
2094 Record.push_back(
D->isCBuffer());
2095 Record.AddSourceLocation(
D->getLocStart());
2096 Record.AddSourceLocation(
D->getLBraceLoc());
2097 Record.AddSourceLocation(
D->getRBraceLoc());
2103 Record.writeOMPChildren(
D->Data);
2109 Record.writeOMPChildren(
D->Data);
2115 Record.writeOMPChildren(
D->Data);
2121 static_assert(DeclContext::NumOMPDeclareReductionDeclBits == 15,
2122 "You need to update the serializer after you change the "
2123 "NumOMPDeclareReductionDeclBits");
2127 Record.AddStmt(
D->getCombinerIn());
2128 Record.AddStmt(
D->getCombinerOut());
2129 Record.AddStmt(
D->getCombiner());
2130 Record.AddStmt(
D->getInitOrig());
2131 Record.AddStmt(
D->getInitPriv());
2132 Record.AddStmt(
D->getInitializer());
2133 Record.push_back(llvm::to_underlying(
D->getInitializerKind()));
2134 Record.AddDeclRef(
D->getPrevDeclInScope());
2139 Record.writeOMPChildren(
D->Data);
2141 Record.AddDeclarationName(
D->getVarName());
2142 Record.AddDeclRef(
D->getPrevDeclInScope());
2156template <FunctionDecl::TemplatedKind Kind>
2157std::shared_ptr<llvm::BitCodeAbbrev>
2159 using namespace llvm;
2161 auto Abv = std::make_shared<BitCodeAbbrev>();
2162 Abv->Add(BitCodeAbbrevOp(Code));
2164 Abv->Add(BitCodeAbbrevOp(0));
2165 Abv->Add(BitCodeAbbrevOp(Kind));
2170 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2173 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2175 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2176 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2178 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2179 }
else if constexpr (
Kind ==
2181 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2182 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2184 Abv->Add(BitCodeAbbrevOp(1));
2187 BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2188 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2189 Abv->Add(BitCodeAbbrevOp(0));
2190 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2191 Abv->Add(BitCodeAbbrevOp(0));
2193 BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2197 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2198 Abv->Add(BitCodeAbbrevOp(0));
2200 llvm_unreachable(
"Unknown templated kind?");
2203 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2212 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2213 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2216 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2217 Abv->Add(BitCodeAbbrevOp(0));
2219 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2221 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2222 Abv->Add(BitCodeAbbrevOp(0));
2223 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2225 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 11));
2226 Abv->Add(BitCodeAbbrevOp(
2227 BitCodeAbbrevOp::Fixed,
2235 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2236 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32));
2245 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2246 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2250template <FunctionDecl::TemplatedKind Kind>
2251std::shared_ptr<llvm::BitCodeAbbrev> getCXXMethodAbbrev() {
2256void ASTWriter::WriteDeclAbbrevs() {
2257 using namespace llvm;
2259 std::shared_ptr<BitCodeAbbrev> Abv;
2262 Abv = std::make_shared<BitCodeAbbrev>();
2265 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2273 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2274 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2276 Abv->Add(BitCodeAbbrevOp(0));
2277 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2278 Abv->Add(BitCodeAbbrevOp(0));
2280 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2282 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2283 Abv->Add(BitCodeAbbrevOp(0));
2284 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2286 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2287 Abv->Add(BitCodeAbbrevOp(0));
2289 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2290 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2291 DeclFieldAbbrev = Stream.EmitAbbrev(std::move(Abv));
2294 Abv = std::make_shared<BitCodeAbbrev>();
2297 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2302 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2303 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2305 Abv->Add(BitCodeAbbrevOp(0));
2306 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2307 Abv->Add(BitCodeAbbrevOp(0));
2309 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2311 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2312 Abv->Add(BitCodeAbbrevOp(0));
2313 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2315 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2316 Abv->Add(BitCodeAbbrevOp(0));
2318 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2319 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2321 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2322 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2323 DeclObjCIvarAbbrev = Stream.EmitAbbrev(std::move(Abv));
2326 Abv = std::make_shared<BitCodeAbbrev>();
2329 Abv->Add(BitCodeAbbrevOp(0));
2331 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2339 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2340 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2342 Abv->Add(BitCodeAbbrevOp(0));
2343 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2344 Abv->Add(BitCodeAbbrevOp(0));
2346 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2347 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2349 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2350 Abv->Add(BitCodeAbbrevOp(
2351 BitCodeAbbrevOp::Fixed,
2355 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2356 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2358 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2359 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2360 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2361 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 20));
2362 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32));
2363 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2365 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2366 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2367 DeclEnumAbbrev = Stream.EmitAbbrev(std::move(Abv));
2370 Abv = std::make_shared<BitCodeAbbrev>();
2373 Abv->Add(BitCodeAbbrevOp(0));
2375 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2383 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2384 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2386 Abv->Add(BitCodeAbbrevOp(0));
2387 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2388 Abv->Add(BitCodeAbbrevOp(0));
2390 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2391 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2393 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2394 Abv->Add(BitCodeAbbrevOp(
2395 BitCodeAbbrevOp::Fixed,
2399 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2400 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2402 Abv->Add(BitCodeAbbrevOp(
2403 BitCodeAbbrevOp::Fixed,
2413 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 26));
2416 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2417 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2418 DeclRecordAbbrev = Stream.EmitAbbrev(std::move(Abv));
2421 Abv = std::make_shared<BitCodeAbbrev>();
2424 Abv->Add(BitCodeAbbrevOp(0));
2426 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2432 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2433 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2435 Abv->Add(BitCodeAbbrevOp(0));
2436 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2437 Abv->Add(BitCodeAbbrevOp(0));
2439 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2441 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2442 Abv->Add(BitCodeAbbrevOp(0));
2443 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2446 BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2449 Abv->Add(BitCodeAbbrevOp(0));
2451 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2452 Abv->Add(BitCodeAbbrevOp(
2453 BitCodeAbbrevOp::Fixed,
2458 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2459 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2460 DeclParmVarAbbrev = Stream.EmitAbbrev(std::move(Abv));
2463 Abv = std::make_shared<BitCodeAbbrev>();
2466 Abv->Add(BitCodeAbbrevOp(0));
2468 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2474 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2475 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2477 Abv->Add(BitCodeAbbrevOp(0));
2478 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2479 Abv->Add(BitCodeAbbrevOp(0));
2481 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2482 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2484 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2485 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2486 DeclTypedefAbbrev = Stream.EmitAbbrev(std::move(Abv));
2489 Abv = std::make_shared<BitCodeAbbrev>();
2492 Abv->Add(BitCodeAbbrevOp(0));
2494 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2499 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2500 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2502 Abv->Add(BitCodeAbbrevOp(0));
2503 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2504 Abv->Add(BitCodeAbbrevOp(0));
2506 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2508 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2509 Abv->Add(BitCodeAbbrevOp(0));
2510 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2512 Abv->Add(BitCodeAbbrevOp(
2513 BitCodeAbbrevOp::Fixed,
2521 Abv->Add(BitCodeAbbrevOp(0));
2523 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
2524 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2525 DeclVarAbbrev = Stream.EmitAbbrev(std::move(Abv));
2528 DeclCXXMethodAbbrev =
2529 Stream.EmitAbbrev(getCXXMethodAbbrev<FunctionDecl::TK_NonTemplate>());
2530 DeclTemplateCXXMethodAbbrev = Stream.EmitAbbrev(
2531 getCXXMethodAbbrev<FunctionDecl::TK_FunctionTemplate>());
2532 DeclDependentNonTemplateCXXMethodAbbrev = Stream.EmitAbbrev(
2533 getCXXMethodAbbrev<FunctionDecl::TK_DependentNonTemplate>());
2534 DeclMemberSpecializedCXXMethodAbbrev = Stream.EmitAbbrev(
2535 getCXXMethodAbbrev<FunctionDecl::TK_MemberSpecialization>());
2536 DeclTemplateSpecializedCXXMethodAbbrev = Stream.EmitAbbrev(
2537 getCXXMethodAbbrev<FunctionDecl::TK_FunctionTemplateSpecialization>());
2538 DeclDependentSpecializationCXXMethodAbbrev = Stream.EmitAbbrev(
2543 Abv = std::make_shared<BitCodeAbbrev>();
2545 Abv->Add(BitCodeAbbrevOp(0));
2547 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2553 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2554 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2556 Abv->Add(BitCodeAbbrevOp(0));
2557 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2558 Abv->Add(BitCodeAbbrevOp(0));
2560 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2561 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2564 BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1));
2565 Abv->Add(BitCodeAbbrevOp(0));
2566 DeclTemplateTypeParmAbbrev = Stream.EmitAbbrev(std::move(Abv));
2569 Abv = std::make_shared<BitCodeAbbrev>();
2572 Abv->Add(BitCodeAbbrevOp(0));
2574 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed,
2579 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2580 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2582 Abv->Add(BitCodeAbbrevOp(0));
2583 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2584 Abv->Add(BitCodeAbbrevOp(0));
2586 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2587 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 11));
2588 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2589 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR,
2591 DeclUsingShadowAbbrev = Stream.EmitAbbrev(std::move(Abv));
2594 Abv = std::make_shared<BitCodeAbbrev>();
2599 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7));
2600 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2605 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 5));
2606 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2607 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2608 DeclRefExprAbbrev = Stream.EmitAbbrev(std::move(Abv));
2611 Abv = std::make_shared<BitCodeAbbrev>();
2616 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 10));
2617 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2619 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2620 Abv->Add(BitCodeAbbrevOp(32));
2621 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2622 IntegerLiteralAbbrev = Stream.EmitAbbrev(std::move(Abv));
2625 Abv = std::make_shared<BitCodeAbbrev>();
2630 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 10));
2631 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2633 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2634 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2635 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
2636 CharacterLiteralAbbrev = Stream.EmitAbbrev(std::move(Abv));
2639 Abv = std::make_shared<BitCodeAbbrev>();
2644 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 10));
2645 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2647 Abv->Add(BitCodeAbbrevOp(0));
2649 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 9));
2651 ExprImplicitCastAbbrev = Stream.EmitAbbrev(std::move(Abv));
2654 Abv = std::make_shared<BitCodeAbbrev>();
2660 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 5));
2661 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2664 BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2665 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2666 BinaryOperatorAbbrev = Stream.EmitAbbrev(std::move(Abv));
2669 Abv = std::make_shared<BitCodeAbbrev>();
2675 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 5));
2676 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2680 BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2681 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2683 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2684 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2685 CompoundAssignOperatorAbbrev = Stream.EmitAbbrev(std::move(Abv));
2688 Abv = std::make_shared<BitCodeAbbrev>();
2693 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 10));
2694 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2696 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2697 Abv->Add(BitCodeAbbrevOp(0));
2698 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2699 CallExprAbbrev = Stream.EmitAbbrev(std::move(Abv));
2702 Abv = std::make_shared<BitCodeAbbrev>();
2707 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 10));
2708 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2710 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2711 Abv->Add(BitCodeAbbrevOp(0));
2712 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2714 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2715 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2716 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2717 CXXOperatorCallExprAbbrev = Stream.EmitAbbrev(std::move(Abv));
2720 Abv = std::make_shared<BitCodeAbbrev>();
2725 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 10));
2726 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2728 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2729 Abv->Add(BitCodeAbbrevOp(0));
2730 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2732 CXXMemberCallExprAbbrev = Stream.EmitAbbrev(std::move(Abv));
2735 Abv = std::make_shared<BitCodeAbbrev>();
2739 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2740 Abv->Add(BitCodeAbbrevOp(0));
2741 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2742 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
2743 CompoundStmtAbbrev = Stream.EmitAbbrev(std::move(Abv));
2745 Abv = std::make_shared<BitCodeAbbrev>();
2747 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob));
2748 DeclContextLexicalAbbrev = Stream.EmitAbbrev(std::move(Abv));
2750 Abv = std::make_shared<BitCodeAbbrev>();
2752 Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob));
2753 DeclContextVisibleLookupAbbrev = Stream.EmitAbbrev(std::move(Abv));
2778 if (isa<PragmaCommentDecl, PragmaDetectMismatchDecl>(
D))
2788 if (isa<FileScopeAsmDecl, TopLevelStmtDecl, ObjCImplDecl>(
D))
2806 assert(!
D->
isFromASTFile() &&
"should not be emitting imported decl");
2813 assert(ID >= FirstDeclID &&
"invalid decl ID");
2829 unsigned Index =
ID.getRawValue() - FirstDeclID.
getRawValue();
2830 if (DeclOffsets.size() == Index)
2831 DeclOffsets.emplace_back(RawLoc, Offset, DeclTypesBlockStartOffset);
2832 else if (DeclOffsets.size() < Index) {
2834 DeclOffsets.resize(Index+1);
2835 DeclOffsets[Index].setRawLoc(RawLoc);
2836 DeclOffsets[Index].setBitOffset(Offset, DeclTypesBlockStartOffset);
2838 llvm_unreachable(
"declarations should be emitted in ID order");
2843 associateDeclWithFile(
D, ID);
2856 bool ModulesCodegen =
false;
2858 std::optional<GVALinkage>
Linkage;
2859 if (Writer->WritingModule &&
2868 if (Writer->Context->
getLangOpts().ModulesCodegen ||
2869 (FD->
hasAttr<DLLExportAttr>() &&
2870 Writer->Context->
getLangOpts().BuildingPCHWithObjectFile)) {
2874 if (!FD->
hasAttr<AlwaysInlineAttr>()) {
2882 Record->push_back(ModulesCodegen);
2884 Writer->
AddDeclRef(FD, Writer->ModularCodegenDecls);
2885 if (
auto *CD = dyn_cast<CXXConstructorDecl>(FD)) {
2886 Record->push_back(CD->getNumCtorInitializers());
2887 if (CD->getNumCtorInitializers())
static void addExplicitSpecifier(ExplicitSpecifier ES, ASTRecordWriter &Record)
static bool isRequiredDecl(const Decl *D, ASTContext &Context, Module *WritingModule)
isRequiredDecl - Check if this is a "required" Decl, which must be seen by consumers of the AST.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
llvm::MachO::Record Record
This file defines OpenMP AST classes for clauses.
Defines the SourceManager interface.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
SourceManager & getSourceManager()
NamedDecl * getInstantiatedFromUsingDecl(NamedDecl *Inst)
If the given using decl Inst is an instantiation of another (possibly unresolved) using decl,...
DeclarationNameTable DeclarationNames
bool DeclMustBeEmitted(const Decl *D)
Determines if the decl can be CodeGen'ed or deserialized from PCH lazily, only when used; this is onl...
const CXXMethodDecl * getCurrentKeyFunction(const CXXRecordDecl *RD)
Get our current best idea for the key function of the given record decl, or nullptr if there isn't on...
const LangOptions & getLangOpts() const
FieldDecl * getInstantiatedFromUnnamedFieldDecl(FieldDecl *Field)
UsingEnumDecl * getInstantiatedFromUsingEnumDecl(UsingEnumDecl *Inst)
If the given using-enum decl Inst is an instantiation of another using-enum decl, return it.
GVALinkage GetGVALinkageForFunction(const FunctionDecl *FD) const
BlockVarCopyInit getBlockVarCopyInit(const VarDecl *VD) const
Get the copy initialization expression of the VarDecl VD, or nullptr if none exists.
const ObjCMethodDecl * getObjCMethodRedeclaration(const ObjCMethodDecl *MD) const
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists.
GVALinkage GetGVALinkageForVariable(const VarDecl *VD) const
UsingShadowDecl * getInstantiatedFromUsingShadowDecl(UsingShadowDecl *Inst)
ExternalASTSource * getExternalSource() const
Retrieve a pointer to the external AST source associated with this AST context, if any.
void VisitBindingDecl(BindingDecl *D)
void VisitObjCTypeParamDecl(ObjCTypeParamDecl *D)
void VisitEmptyDecl(EmptyDecl *D)
void VisitCXXMethodDecl(CXXMethodDecl *D)
void VisitPragmaDetectMismatchDecl(PragmaDetectMismatchDecl *D)
void VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D)
void VisitOMPRequiresDecl(OMPRequiresDecl *D)
void VisitNamedDecl(NamedDecl *D)
RedeclarableTemplateDecl::SpecEntryTraits< EntryType >::DeclType * getSpecializationDecl(EntryType &T)
Get the specialization decl from an entry in the specialization list.
void VisitCXXDeductionGuideDecl(CXXDeductionGuideDecl *D)
void VisitOMPDeclareMapperDecl(OMPDeclareMapperDecl *D)
void VisitNamespaceDecl(NamespaceDecl *D)
void VisitOMPAllocateDecl(OMPAllocateDecl *D)
void VisitExportDecl(ExportDecl *D)
void VisitOMPThreadPrivateDecl(OMPThreadPrivateDecl *D)
void VisitTemplateTemplateParmDecl(TemplateTemplateParmDecl *D)
void VisitParmVarDecl(ParmVarDecl *D)
void VisitRedeclarable(Redeclarable< T > *D)
void VisitFriendDecl(FriendDecl *D)
void VisitDeclaratorDecl(DeclaratorDecl *D)
void VisitTemplateParamObjectDecl(TemplateParamObjectDecl *D)
void VisitConceptDecl(ConceptDecl *D)
void VisitObjCPropertyDecl(ObjCPropertyDecl *D)
void VisitBlockDecl(BlockDecl *D)
void VisitLabelDecl(LabelDecl *LD)
void VisitTemplateDecl(TemplateDecl *D)
void VisitImplicitConceptSpecializationDecl(ImplicitConceptSpecializationDecl *D)
void VisitCXXDestructorDecl(CXXDestructorDecl *D)
void VisitFieldDecl(FieldDecl *D)
void VisitRequiresExprBodyDecl(RequiresExprBodyDecl *D)
void VisitObjCContainerDecl(ObjCContainerDecl *D)
void RegisterTemplateSpecialization(const Decl *Template, const Decl *Specialization)
Ensure that this template specialization is associated with the specified template on reload.
void VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *D)
void VisitVarTemplatePartialSpecializationDecl(VarTemplatePartialSpecializationDecl *D)
void VisitUnnamedGlobalConstantDecl(UnnamedGlobalConstantDecl *D)
void VisitCXXConversionDecl(CXXConversionDecl *D)
void VisitUsingShadowDecl(UsingShadowDecl *D)
void VisitValueDecl(ValueDecl *D)
void VisitIndirectFieldDecl(IndirectFieldDecl *D)
void VisitImplicitParamDecl(ImplicitParamDecl *D)
decltype(T::PartialSpecializations) & getPartialSpecializations(T *Common)
Get the list of partial specializations from a template's common ptr.
void VisitObjCProtocolDecl(ObjCProtocolDecl *D)
void VisitUsingDirectiveDecl(UsingDirectiveDecl *D)
void VisitFunctionTemplateDecl(FunctionTemplateDecl *D)
void VisitObjCCategoryDecl(ObjCCategoryDecl *D)
void VisitTopLevelStmtDecl(TopLevelStmtDecl *D)
void VisitLinkageSpecDecl(LinkageSpecDecl *D)
void VisitAccessSpecDecl(AccessSpecDecl *D)
ASTDeclWriter(ASTWriter &Writer, ASTContext &Context, ASTWriter::RecordDataImpl &Record, bool GeneratingReducedBMI)
void VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D)
void VisitLifetimeExtendedTemporaryDecl(LifetimeExtendedTemporaryDecl *D)
void VisitMSPropertyDecl(MSPropertyDecl *D)
void VisitUsingEnumDecl(UsingEnumDecl *D)
void VisitTypeDecl(TypeDecl *D)
void VisitClassTemplatePartialSpecializationDecl(ClassTemplatePartialSpecializationDecl *D)
void VisitEnumConstantDecl(EnumConstantDecl *D)
void VisitObjCIvarDecl(ObjCIvarDecl *D)
void VisitCapturedDecl(CapturedDecl *D)
void VisitOMPCapturedExprDecl(OMPCapturedExprDecl *D)
void VisitPragmaCommentDecl(PragmaCommentDecl *D)
void VisitRecordDecl(RecordDecl *D)
void VisitUnresolvedUsingIfExistsDecl(UnresolvedUsingIfExistsDecl *D)
void VisitTypedefDecl(TypedefDecl *D)
void VisitMSGuidDecl(MSGuidDecl *D)
void VisitTypedefNameDecl(TypedefNameDecl *D)
void VisitVarTemplateSpecializationDecl(VarTemplateSpecializationDecl *D)
void VisitNonTypeTemplateParmDecl(NonTypeTemplateParmDecl *D)
void VisitUsingDecl(UsingDecl *D)
void VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D)
void AddTemplateSpecializations(DeclTy *D)
void VisitConstructorUsingShadowDecl(ConstructorUsingShadowDecl *D)
void VisitObjCImplementationDecl(ObjCImplementationDecl *D)
void VisitFriendTemplateDecl(FriendTemplateDecl *D)
void VisitObjCMethodDecl(ObjCMethodDecl *D)
void VisitNamespaceAliasDecl(NamespaceAliasDecl *D)
void VisitVarTemplateDecl(VarTemplateDecl *D)
void VisitHLSLBufferDecl(HLSLBufferDecl *D)
void VisitObjCImplDecl(ObjCImplDecl *D)
void VisitObjCAtDefsFieldDecl(ObjCAtDefsFieldDecl *D)
void VisitVarDecl(VarDecl *D)
void VisitImportDecl(ImportDecl *D)
void VisitCXXRecordDecl(CXXRecordDecl *D)
void VisitCXXConstructorDecl(CXXConstructorDecl *D)
void VisitOMPDeclareReductionDecl(OMPDeclareReductionDecl *D)
void VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D)
void VisitFileScopeAsmDecl(FileScopeAsmDecl *D)
void VisitClassTemplateDecl(ClassTemplateDecl *D)
void VisitFunctionDecl(FunctionDecl *D)
void VisitClassTemplateSpecializationDecl(ClassTemplateSpecializationDecl *D)
void VisitEnumDecl(EnumDecl *D)
void VisitTranslationUnitDecl(TranslationUnitDecl *D)
void VisitObjCCompatibleAliasDecl(ObjCCompatibleAliasDecl *D)
void VisitStaticAssertDecl(StaticAssertDecl *D)
void VisitDeclContext(DeclContext *DC)
Emit the DeclContext part of a declaration context decl.
void AddObjCTypeParamList(ObjCTypeParamList *typeParams)
Add an Objective-C type parameter list to the given record.
void VisitObjCInterfaceDecl(ObjCInterfaceDecl *D)
void VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D)
void AddFirstDeclFromEachModule(const Decl *D, bool IncludeLocal)
Add to the record the first declaration from each module file that provides a declaration of D.
void VisitUsingPackDecl(UsingPackDecl *D)
void VisitDecompositionDecl(DecompositionDecl *D)
ArrayRef< Decl > getPartialSpecializations(FunctionTemplateDecl::Common *)
void VisitTagDecl(TagDecl *D)
void VisitTypeAliasDecl(TypeAliasDecl *D)
void VisitRedeclarableTemplateDecl(RedeclarableTemplateDecl *D)
ModuleFile * getOwningModuleFile(const Decl *D) const
Retrieve the module file that owns the given declaration, or NULL if the declaration is not from a mo...
An object for streaming information to a record.
void AddFunctionDefinition(const FunctionDecl *FD)
Add a definition for the given function to the queue of statements to emit.
uint64_t Emit(unsigned Code, unsigned Abbrev=0)
Emit the record to the stream, followed by its substatements, and return its offset.
void AddStmt(Stmt *S)
Add the given statement or expression to the queue of statements to emit.
void AddCXXCtorInitializers(ArrayRef< CXXCtorInitializer * > CtorInits)
Emit a CXXCtorInitializer array.
void AddDeclRef(const Decl *D)
Emit a reference to a declaration.
Writes an AST file containing the contents of a translation unit.
unsigned getDeclParmVarAbbrev() const
unsigned getDeclTemplateTypeParmAbbrev() const
unsigned getDeclObjCIvarAbbrev() const
unsigned getDeclTypedefAbbrev() const
unsigned getDeclUsingShadowAbbrev() const
bool isGeneratingReducedBMI() const
unsigned getDeclVarAbbrev() const
unsigned getDeclEnumAbbrev() const
bool IsLocalDecl(const Decl *D)
Is this a local declaration (that is, one that will be written to our AST file)? This is the case for...
void ClearSwitchCaseIDs()
LocalDeclID GetDeclRef(const Decl *D)
Force a declaration to be emitted and get its local ID to the module file been writing.
unsigned getDeclCXXMethodAbbrev(FunctionDecl::TemplatedKind Kind) const
const Decl * getFirstLocalDecl(const Decl *D)
Find the first local declaration of a given local redeclarable decl.
SourceLocationEncoding::RawLocEncoding getRawSourceLocationEncoding(SourceLocation Loc, LocSeq *Seq=nullptr)
Return the raw encodings for source locations.
SmallVector< uint64_t, 64 > RecordData
unsigned getAnonymousDeclarationNumber(const NamedDecl *D)
unsigned getDeclFieldAbbrev() const
unsigned getDeclRecordAbbrev() const
void AddDeclRef(const Decl *D, RecordDataImpl &Record)
Emit a reference to a declaration.
Represents an access specifier followed by colon ':'.
A binding in a decomposition declaration.
A simple helper class to pack several bits in order into (a) 32 bit integer(s).
void addBits(uint32_t Value, uint32_t BitsWidth)
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Represents a C++ constructor within a class.
Represents a C++ conversion function within a class.
Represents a C++ deduction guide declaration.
Represents a C++ destructor within a class.
Represents a static or instance method of a struct/union/class.
Represents a C++ struct/union/class.
static bool classofKind(Kind K)
Represents the body of a CapturedStmt, and serves as its DeclContext.
unsigned getNumParams() const
unsigned getContextParamPosition() const
ImplicitParamDecl * getParam(unsigned i) const
Declaration of a class template.
Represents a class template specialization, which refers to a class template with a given set of temp...
Declaration of a C++20 concept.
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
A POD class for pairing a NamedDecl* with an access specifier.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
lookup_result noload_lookup(DeclarationName Name)
Find the declarations with the given name that are visible within this context; don't attempt to retr...
DeclID getRawValue() const
A helper iterator adaptor to convert the iterators to SmallVector<SomeDeclID> to the iterators to Sma...
A simple visitor class that helps create declaration visitors.
Decl - This represents one declaration (or definition), e.g.
Decl * getPreviousDecl()
Retrieve the previous declaration that declares the same entity as this declaration,...
Decl * getMostRecentDecl()
Retrieve the most recent declaration that declares the same entity as this declaration (which may be ...
SourceLocation getEndLoc() const LLVM_READONLY
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined.
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
bool isInNamedModule() const
Whether this declaration comes from a named module.
virtual bool isOutOfLine() const
Determine whether this declaration is declared out of line (outside its semantic context).
ModuleOwnershipKind getModuleOwnershipKind() const
Get the kind of module ownership for this declaration.
bool isParameterPack() const
Whether this declaration is a parameter pack.
virtual Stmt * getBody() const
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
bool isReferenced() const
Whether any declaration of this entity was referenced.
bool isCanonicalDecl() const
Whether this particular Decl is a canonical one.
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
bool isFromASTFile() const
Determine whether this declaration came from an AST file (such as a precompiled header or module) rat...
bool isInvalidDecl() const
unsigned getIdentifierNamespace() const
SourceLocation getLocation() const
const char * getDeclKindName() const
bool isTopLevelDeclInObjCContainer() const
Whether this declaration is a top-level declaration (function, global variable, etc....
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required.
DeclContext * getDeclContext()
AccessSpecifier getAccess() const
SourceLocation getBeginLoc() const LLVM_READONLY
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
Represents a ValueDecl that came out of a declarator.
A decomposition declaration.
Provides information about a dependent function-template specialization declaration.
ArrayRef< FunctionTemplateDecl * > getCandidates() const
Returns the candidates for the primary function template.
const ASTTemplateArgumentListInfo * TemplateArgumentsAsWritten
The template arguments as written in the sources, if provided.
Represents an empty-declaration.
An instance of this object exists for each enum constant that is defined.
Store information needed for an explicit specifier.
ExplicitSpecKind getKind() const
const Expr * getExpr() const
Represents a standard C++ module export declaration.
This represents one expression.
Represents a member of a struct/union/class.
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
Declaration of a friend template.
Represents a function declaration or definition.
Stmt * getBody(const FunctionDecl *&Definition) const
Retrieve the body (definition) of the function.
bool doesThisDeclarationHaveABody() const
Returns whether this specific declaration of the function has a body.
@ TK_MemberSpecialization
@ TK_DependentNonTemplate
@ TK_FunctionTemplateSpecialization
@ TK_DependentFunctionTemplateSpecialization
Declaration of a template function.
FunctionTemplateDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this template.
Provides information about a function template specialization, which is a FunctionDecl that has been ...
TemplateArgumentList * TemplateArguments
The template arguments used to produce the function template specialization from the function templat...
FunctionTemplateDecl * getTemplate() const
Retrieve the template from which this function was specialized.
MemberSpecializationInfo * getMemberSpecializationInfo() const
Get the specialization info if this function template specialization is also a member specialization:
const ASTTemplateArgumentListInfo * TemplateArgumentsAsWritten
The template arguments as written in the sources, if provided.
SourceLocation getPointOfInstantiation() const
Retrieve the first point of instantiation of this function template specialization.
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine what kind of template specialization this is.
HLSLBufferDecl - Represent a cbuffer or tbuffer declaration.
Describes a module import declaration, which makes the contents of the named module visible in the cu...
Represents a field injected from an anonymous union/struct into the parent scope.
Represents the declaration of a label.
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
Represents a linkage specification.
An instance of this class represents the declaration of a property member.
Provides information a specialization of a member of a class template, which may be a member function...
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine what kind of template specialization this is.
SourceLocation getPointOfInstantiation() const
Retrieve the first point of instantiation of this member.
NamedDecl * getInstantiatedFrom() const
Retrieve the member declaration from which this member was instantiated.
Describes a module or submodule.
bool isInterfaceOrPartition() const
bool isNamedModule() const
Does this Module is a named module of a standard named module?
This represents a decl that may have a name.
Represents a C++ namespace alias.
Represent a C++ namespace.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
This represents '#pragma omp allocate ...' directive.
Pseudo declaration for capturing expressions.
This represents '#pragma omp declare mapper ...' directive.
This represents '#pragma omp declare reduction ...' directive.
This represents '#pragma omp requires...' directive.
This represents '#pragma omp threadprivate ...' directive.
Represents a field declaration created by an @defs(...).
static bool classofKind(Kind K)
ObjCCategoryDecl - Represents a category declaration.
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
ObjCCompatibleAliasDecl - Represents alias of a class.
ObjCContainerDecl - Represents a container for method declarations.
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Represents an ObjC class declaration.
ObjCIvarDecl - Represents an ObjC instance variable.
static bool classofKind(Kind K)
ObjCMethodDecl - Represents an instance or class method declaration.
Represents one property declaration in an Objective-C interface.
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Represents an Objective-C protocol declaration.
Represents the declaration of an Objective-C type parameter.
Stores a list of Objective-C type parameters for a parameterized class or a category/extension thereo...
unsigned size() const
Determine the number of type parameters in this list.
SourceLocation getRAngleLoc() const
SourceLocation getLAngleLoc() const
Represents a parameter to a function.
Represents a #pragma detect_mismatch line.
PrettyDeclStackTraceEntry - If a crash occurs in the parser while parsing something related to a decl...
A (possibly-)qualified type.
Represents a struct/union/class.
Declaration of a redeclarable template.
Provides common interface for the Decls that can be redeclared.
Represents the body of a requires-expression.
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
This class handles loading and caching of source files into memory.
Represents a C++11 static_assert declaration.
StringLiteral - This represents a string literal expression, e.g.
Represents the declaration of a struct/union/class/enum.
unsigned size() const
Retrieve the number of template arguments in this template argument list.
const TemplateArgument & get(unsigned Idx) const
Retrieve the template argument at a given index.
Represents a template argument.
@ Type
The template argument is a type.
ArgKind getKind() const
Return the kind of stored template argument.
The base class of all kinds of template declarations (e.g., class, function, etc.).
A template parameter object.
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Declaration of a template type parameter.
A declaration that models statements at global scope.
The top declaration context.
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Declaration of an alias template.
Models the abbreviated syntax to constrain a template type parameter: template <convertible_to<string...
Expr * getImmediatelyDeclaredConstraint() const
Get the immediately-declared constraint expression introduced by this type-constraint,...
ConceptReference * getConceptReference() const
Represents a declaration of a type.
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Base class for declarations which introduce a typedef-name.
An artificial decl, representing a global anonymous constant value which is uniquified by value withi...
This node is generated when a using-declaration that was annotated with attribute((using_if_exists)) ...
Represents a dependent using declaration which was marked with typename.
Represents a dependent using declaration which was not marked with typename.
Represents a C++ using-declaration.
Represents C++ using-directive.
Represents a C++ using-enum-declaration.
Represents a pack of using declarations that a single using-declarator pack-expanded into.
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Represents a variable declaration or definition.
@ CInit
C-style initialization with assignment.
Declaration of a variable template.
Represents a variable template specialization, which refers to a variable template with a given set o...
const unsigned int LOCAL_REDECLARATIONS
Record code for a list of local redeclarations of a declaration.
DeclCode
Record codes for each kind of declaration.
@ DECL_EMPTY
An EmptyDecl record.
@ DECL_CAPTURED
A CapturedDecl record.
@ DECL_CXX_RECORD
A CXXRecordDecl record.
@ DECL_VAR_TEMPLATE_PARTIAL_SPECIALIZATION
A VarTemplatePartialSpecializationDecl record.
@ DECL_OMP_ALLOCATE
An OMPAllocateDcl record.
@ DECL_MS_PROPERTY
A MSPropertyDecl record.
@ DECL_OMP_DECLARE_MAPPER
An OMPDeclareMapperDecl record.
@ DECL_TOP_LEVEL_STMT_DECL
A TopLevelStmtDecl record.
@ DECL_REQUIRES_EXPR_BODY
A RequiresExprBodyDecl record.
@ DECL_STATIC_ASSERT
A StaticAssertDecl record.
@ DECL_INDIRECTFIELD
A IndirectFieldDecl record.
@ DECL_TEMPLATE_TEMPLATE_PARM
A TemplateTemplateParmDecl record.
@ DECL_IMPORT
An ImportDecl recording a module import.
@ DECL_UNNAMED_GLOBAL_CONSTANT
A UnnamedGlobalConstantDecl record.
@ DECL_ACCESS_SPEC
An AccessSpecDecl record.
@ DECL_OBJC_TYPE_PARAM
An ObjCTypeParamDecl record.
@ DECL_OBJC_CATEGORY_IMPL
A ObjCCategoryImplDecl record.
@ DECL_ENUM_CONSTANT
An EnumConstantDecl record.
@ DECL_PARM_VAR
A ParmVarDecl record.
@ DECL_TYPEDEF
A TypedefDecl record.
@ DECL_EXPANDED_TEMPLATE_TEMPLATE_PARM_PACK
A TemplateTemplateParmDecl record that stores an expanded template template parameter pack.
@ DECL_HLSL_BUFFER
A HLSLBufferDecl record.
@ DECL_NAMESPACE_ALIAS
A NamespaceAliasDecl record.
@ DECL_TYPEALIAS
A TypeAliasDecl record.
@ DECL_FUNCTION_TEMPLATE
A FunctionTemplateDecl record.
@ DECL_MS_GUID
A MSGuidDecl record.
@ DECL_UNRESOLVED_USING_TYPENAME
An UnresolvedUsingTypenameDecl record.
@ DECL_CLASS_TEMPLATE_SPECIALIZATION
A ClassTemplateSpecializationDecl record.
@ DECL_FILE_SCOPE_ASM
A FileScopeAsmDecl record.
@ DECL_CXX_CONSTRUCTOR
A CXXConstructorDecl record.
@ DECL_CXX_CONVERSION
A CXXConversionDecl record.
@ DECL_FIELD
A FieldDecl record.
@ DECL_LINKAGE_SPEC
A LinkageSpecDecl record.
@ DECL_NAMESPACE
A NamespaceDecl record.
@ DECL_NON_TYPE_TEMPLATE_PARM
A NonTypeTemplateParmDecl record.
@ DECL_USING_PACK
A UsingPackDecl record.
@ DECL_FUNCTION
A FunctionDecl record.
@ DECL_USING_DIRECTIVE
A UsingDirecitveDecl record.
@ DECL_RECORD
A RecordDecl record.
@ DECL_CONTEXT_LEXICAL
A record that stores the set of declarations that are lexically stored within a given DeclContext.
@ DECL_BLOCK
A BlockDecl record.
@ DECL_UNRESOLVED_USING_VALUE
An UnresolvedUsingValueDecl record.
@ DECL_TYPE_ALIAS_TEMPLATE
A TypeAliasTemplateDecl record.
@ DECL_OBJC_CATEGORY
A ObjCCategoryDecl record.
@ DECL_VAR
A VarDecl record.
@ DECL_UNRESOLVED_USING_IF_EXISTS
An UnresolvedUsingIfExistsDecl record.
@ DECL_USING
A UsingDecl record.
@ DECL_OBJC_PROTOCOL
A ObjCProtocolDecl record.
@ DECL_TEMPLATE_TYPE_PARM
A TemplateTypeParmDecl record.
@ DECL_VAR_TEMPLATE_SPECIALIZATION
A VarTemplateSpecializationDecl record.
@ DECL_OBJC_IMPLEMENTATION
A ObjCImplementationDecl record.
@ DECL_LABEL
A LabelDecl record.
@ DECL_OBJC_COMPATIBLE_ALIAS
A ObjCCompatibleAliasDecl record.
@ DECL_CONSTRUCTOR_USING_SHADOW
A ConstructorUsingShadowDecl record.
@ DECL_USING_ENUM
A UsingEnumDecl record.
@ DECL_FRIEND_TEMPLATE
A FriendTemplateDecl record.
@ DECL_PRAGMA_DETECT_MISMATCH
A PragmaDetectMismatchDecl record.
@ DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK
A NonTypeTemplateParmDecl record that stores an expanded non-type template parameter pack.
@ DECL_OBJC_AT_DEFS_FIELD
A ObjCAtDefsFieldDecl record.
@ DECL_IMPLICIT_PARAM
An ImplicitParamDecl record.
@ DECL_FRIEND
A FriendDecl record.
@ DECL_CXX_METHOD
A CXXMethodDecl record.
@ DECL_EXPORT
An ExportDecl record.
@ DECL_BINDING
A BindingDecl record.
@ DECL_PRAGMA_COMMENT
A PragmaCommentDecl record.
@ DECL_ENUM
An EnumDecl record.
@ DECL_DECOMPOSITION
A DecompositionDecl record.
@ DECL_OMP_DECLARE_REDUCTION
An OMPDeclareReductionDecl record.
@ DECL_OMP_THREADPRIVATE
An OMPThreadPrivateDecl record.
@ DECL_OBJC_METHOD
A ObjCMethodDecl record.
@ DECL_CXX_DESTRUCTOR
A CXXDestructorDecl record.
@ DECL_OMP_CAPTUREDEXPR
An OMPCapturedExprDecl record.
@ DECL_CLASS_TEMPLATE
A ClassTemplateDecl record.
@ DECL_USING_SHADOW
A UsingShadowDecl record.
@ DECL_CONCEPT
A ConceptDecl record.
@ DECL_CXX_DEDUCTION_GUIDE
A CXXDeductionGuideDecl record.
@ DECL_OMP_REQUIRES
An OMPRequiresDecl record.
@ DECL_OBJC_IVAR
A ObjCIvarDecl record.
@ DECL_OBJC_PROPERTY
A ObjCPropertyDecl record.
@ DECL_TEMPLATE_PARAM_OBJECT
A TemplateParamObjectDecl record.
@ DECL_OBJC_INTERFACE
A ObjCInterfaceDecl record.
@ DECL_VAR_TEMPLATE
A VarTemplateDecl record.
@ DECL_LIFETIME_EXTENDED_TEMPORARY
An LifetimeExtendedTemporaryDecl record.
@ DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION
A ClassTemplatePartialSpecializationDecl record.
@ DECL_IMPLICIT_CONCEPT_SPECIALIZATION
An ImplicitConceptSpecializationDecl record.
@ DECL_CONTEXT_VISIBLE
A record that stores the set of declarations that are visible from a given DeclContext.
@ DECL_OBJC_PROPERTY_IMPL
A ObjCPropertyImplDecl record.
@ EXPR_COMPOUND_ASSIGN_OPERATOR
A CompoundAssignOperator record.
@ EXPR_CXX_OPERATOR_CALL
A CXXOperatorCallExpr record.
@ EXPR_IMPLICIT_CAST
An ImplicitCastExpr record.
@ EXPR_CHARACTER_LITERAL
A CharacterLiteral record.
@ STMT_COMPOUND
A CompoundStmt record.
@ EXPR_CALL
A CallExpr record.
@ EXPR_BINARY_OPERATOR
A BinaryOperator record.
@ EXPR_DECL_REF
A DeclRefExpr record.
@ EXPR_INTEGER_LITERAL
An IntegerLiteral record.
@ EXPR_CXX_MEMBER_CALL
A CXXMemberCallExpr record.
bool isRedeclarableDeclKind(unsigned Kind)
Determine whether the given declaration kind is redeclarable.
bool needsAnonymousDeclarationNumber(const NamedDecl *D)
Determine whether the given declaration needs an anonymous declaration number.
bool isPartOfPerModuleInitializer(const Decl *D)
Determine whether the given declaration will be included in the per-module initializer if it needs to...
@ UPD_CXX_ADDED_TEMPLATE_SPECIALIZATION
@ UPD_CXX_ADDED_ANONYMOUS_NAMESPACE
The JSON file list parser is used to communicate input to InstallAPI.
@ GVA_AvailableExternally
@ Specialization
We are substituting template parameters for template arguments in order to form a template specializa...
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.
@ SD_Static
Static storage duration.
bool CanElideDeclDef(const Decl *D)
If we can elide the definition of.
const FunctionProtoType * T
@ TSK_ExplicitInstantiationDefinition
This template specialization was instantiated from a template due to an explicit instantiation defini...
@ TSK_ExplicitInstantiationDeclaration
This template specialization was instantiated from a template due to an explicit instantiation declar...
@ TSK_ImplicitInstantiation
This template specialization was implicitly instantiated from a template.
Diagnostic wrappers for TextAPI types for error reporting.
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Copy initialization expr of a __block variable and a boolean flag that indicates whether the expressi...
Data that is common to all of the declarations of a given function template.
Parts of a decomposed MSGuidDecl.
uint16_t Part2
...-89ab-...
uint32_t Part1
{01234567-...
uint16_t Part3
...-cdef-...
uint8_t Part4And5[8]
...-0123-456789abcdef}
static DeclType * getDecl(EntryType *D)