Home | History | Annotate | Download | only in Serialization

Lines Matching refs:Reader

38     ASTReader &Reader;
68 return Local ? Reader.getGlobalBitOffset(F, Local) : 0;
72 return Reader.ReadSourceLocation(F, R, I);
76 return Reader.ReadSourceRange(F, R, I);
80 return Reader.GetTypeSourceInfo(F, R, I);
84 return Reader.ReadDeclID(F, R, I);
88 return Reader.ReadString(R, I);
97 return Reader.ReadDecl(F, R, I);
102 return Reader.ReadDeclAs<T>(F, R, I);
107 Reader.ReadQualifierInfo(F, Info, R, I);
112 Reader.ReadDeclarationNameLoc(F, DNLoc, Name, R, I);
117 Reader.ReadDeclarationNameInfo(F, NameInfo, R, I);
125 return Reader.getGlobalSubmoduleID(F, R[I++]);
129 return Reader.getSubmodule(readSubmoduleID(R, I));
138 static NamedDecl *getAnonymousDeclForMerging(ASTReader &Reader,
141 static void setAnonymousDeclForMerging(ASTReader &Reader, DeclContext *DC,
171 ASTReader &Reader;
182 FindExistingResult(ASTReader &Reader)
183 : Reader(Reader), New(nullptr), Existing(nullptr), AddResult(false),
186 FindExistingResult(ASTReader &Reader, NamedDecl *New, NamedDecl *Existing,
189 : Reader(Reader), New(New), Existing(Existing), AddResult(true),
194 : Reader(Other.Reader), New(Other.New), Existing(Other.Existing),
213 static DeclContext *getPrimaryContextForMerging(ASTReader &Reader,
218 ASTDeclReader(ASTReader &Reader, ASTReader::RecordLocation Loc,
221 : Reader(Reader), F(*Loc.F), Offset(Loc.Offset), ThisDeclID(thisDeclID),
233 static void attachPreviousDeclImpl(ASTReader &Reader,
236 static void attachPreviousDeclImpl(ASTReader &Reader, ...);
237 static void attachPreviousDecl(ASTReader &Reader, Decl *D, Decl *Previous,
389 else if (Reader.getContext().getLangOpts().ModulesLocalVisibility) {
390 Reader.getContext().mergeDefinitionIntoModule(
393 Reader.PendingMergedDefinitionsToDeduplicate.insert(Def);
397 Reader.HiddenNamesMap[Reader.getSubmodule(SubmoduleID)].push_back(Def);
472 TD->setTypeForDecl(Reader.GetType(TypeIDForTypeDecl).getTypePtrOrNull());
478 cast<TypedefNameDecl>(Reader.GetDecl(NamedDeclForTagDecl));
481 ID->TypeForDecl = Reader.GetType(TypeIDForTypeDecl).getTypePtrOrNull();
493 Reader.PendingBodies[FD] = GetCurrentCursorOffset();
512 Reader.addPendingDeclContextInfo(D,
515 D->setDeclContext(Reader.getContext().getTranslationUnitDecl());
521 DeclContext *MergedSemaDC = Reader.MergedDeclContexts.lookup(SemaDC);
525 Reader.getContext());
531 Reader.ReadAttributes(F, Attrs, Record, Idx);
534 D->setAttrsImpl(Attrs, Reader.getContext());
554 } else if (Reader.getContext().getLangOpts().ModulesLocalVisibility) {
559 } else if (Module *Owner = Reader.getSubmodule(SubmoduleID)) {
566 Reader.HiddenNamesMap[Owner].push_back(D);
601 ND->setDeclName(Reader.ReadDeclarationName(F, Record, Idx));
609 TypeIDForTypeDecl = Reader.getGlobalTypeID(F, Record[Idx++]);
618 QualType modedT = Reader.readType(F, Record, Idx);
656 TagDecl::ExtInfo *Info = new (Reader.getContext()) TagDecl::ExtInfo();
663 TypedefNameForLinkage = Reader.GetIdentifierInfo(F, Record, Idx);
676 if (TypeSourceInfo *TI = Reader.GetTypeSourceInfo(F, Record, Idx))
679 ED->setIntegerType(Reader.readType(F, Record, Idx));
680 ED->setPromotionType(Reader.readType(F, Record, Idx));
690 Reader.getContext().getLangOpts().Modules &&
691 Reader.getContext().getLangOpts().CPlusPlus) {
692 EnumDecl *&OldDef = Reader.EnumDefinitions[ED->getCanonicalDecl()];
704 Reader.MergedDeclContexts.insert(std::make_pair(ED, OldDef));
715 ED->setInstantiationOfMemberEnum(Reader.getContext(), InstED, TSK);
732 VD->setType(Reader.readType(F, Record, Idx));
738 ECD->setInitExpr(Reader.ReadExpr(F));
739 ECD->setInitVal(Reader.ReadAPSInt(Record, Idx));
748 = new (Reader.getContext()) DeclaratorDecl::ExtInfo();
795 FD->setInstantiationOfMemberFunction(Reader.getContext(), InstFD, TSK);
807 Reader.ReadTemplateArgumentList(TemplArgs, F, Record, Idx,
819 Reader.ReadTemplateArgumentLoc(F, Record, Idx));
827 ASTContext &C = Reader.getContext();
860 assert(Reader.getContext().getLangOpts().Modules &&
878 TemplArgs.addArgument(Reader.ReadTemplateArgumentLoc(F, Record, Idx));
882 FD->setDependentTemplateSpecialization(Reader.getContext(),
896 FD->setParams(Reader.getContext(), Params);
904 Reader.PendingBodies[MD] = GetCurrentCursorOffset();
919 Reader.getContext().setObjCMethodRedeclaration(MD,
925 MD->setReturnType(Reader.readType(F, Record, Idx));
941 MD->setParamsAndSelLocs(Reader.getContext(), Params, SelLocs);
977 return ObjCTypeParamList::create(Reader.getContext(), lAngleLoc,
984 TypeIDForTypeDecl = Reader.getGlobalTypeID(F, Record[Idx++]);
1015 Reader.getContext());
1024 Reader.getContext());
1030 Reader.PendingDefinitions.insert(ID);
1033 Reader.ObjCClassesLoaded.push_back(ID);
1071 Reader.getContext());
1074 Reader.PendingDefinitions.insert(PD);
1093 Reader.CategoriesDeserialized.insert(CD);
1107 Reader.getContext());
1119 QualType T = Reader.readType(F, Record, Idx);
1128 D->setGetterName(Reader.ReadDeclarationName(F,Record, Idx).getObjCSelector());
1129 D->setSetterName(Reader.ReadDeclarationName(F,Record, Idx).getObjCSelector());
1142 D->setIdentifier(Reader.GetIdentifierInfo(F, Record, Idx));
1165 D->setGetterCXXConstructor(Reader.ReadExpr(F));
1166 D->setSetterCXXAssignment(Reader.ReadExpr(F));
1178 Reader.readType(F, Record, Idx).getAsOpaquePtr());
1180 FD->InitStorage.setPointer(Reader.ReadExpr(F));
1185 Reader.getContext().setInstantiatedFromUnnamedFieldDecl(FD, Tmpl);
1192 PD->GetterId = Reader.GetIdentifierInfo(F, Record, Idx);
1193 PD->SetterId = Reader.GetIdentifierInfo(F, Record, Idx);
1201 FD->Chaining = new (Reader.getContext())NamedDecl*[FD->ChainingSize];
1236 VD->setInit(Reader.ReadExpr(F));
1263 Reader.getContext().setInstantiatedFromStaticDataMember(VD, Tmpl, TSK,POI);
1292 PD->setUninstantiatedDefaultArg(Reader.ReadExpr(F));
1300 AD->setAsmString(cast<StringLiteral>(Reader.ReadExpr(F)));
1306 BD->setBody(cast_or_null<CompoundStmt>(Reader.ReadStmt(F)));
1328 Expr *copyExpr = ((flags & 4) ? Reader.ReadExpr(F) : nullptr);
1332 BD->setCaptures(Reader.getContext(), captures, capturesCXXThis);
1386 NamespaceDecl *Anon = cast<NamespaceDecl>(Reader.GetDecl(AnonNamespace));
1397 D->QualifierLoc = Reader.ReadNestedNameSpecifierLoc(F, Record, Idx);
1405 D->QualifierLoc = Reader.ReadNestedNameSpecifierLoc(F, Record, Idx);
1410 Reader.getContext().setInstantiatedFromUsingDecl(D, Pattern);
1421 Reader.getContext().setInstantiatedFromUsingShadowDecl(D, Pattern);
1439 D->QualifierLoc = Reader.ReadNestedNameSpecifierLoc(F, Record, Idx);
1447 D->QualifierLoc = Reader.ReadNestedNameSpecifierLoc(F, Record, Idx);
1456 D->QualifierLoc = Reader.ReadNestedNameSpecifierLoc(F, Record, Idx);
1513 Reader.ReadUnresolvedSet(F, Data.Conversions, Record, Idx);
1514 Reader.ReadUnresolvedSet(F, Data.VisibleConversions, Record, Idx);
1530 = (Capture*)Reader.Context.Allocate(sizeof(Capture)*Lambda.NumCaptures);
1562 Reader.MergedDeclContexts.insert(std::make_pair(MergeDD.Definition,
1564 Reader.PendingDefinitions.erase(MergeDD.Definition);
1567 assert(Reader.Lookups.find(MergeDD.Definition) == Reader.Lookups.end() &&
1571 auto PFDI = Reader.PendingFakeDefinitionData.find(&DD);
1572 if (PFDI != Reader.PendingFakeDefinitionData.end() &&
1659 Reader
1664 ASTContext &C = Reader.getContext();
1696 Reader.PendingDefinitions.insert(D);
1704 ASTContext &C = Reader.getContext();
1772 Reader.getContext().addOverriddenMethod(D, MD->getCanonicalDecl());
1835 Reader.ReadTemplateParameterList(F, Record, Idx);
1847 D->Params[i] = Reader.ReadTemplateParameterList(F, Record, Idx);
1859 NamedDecl *TemplatedDecl = cast_or_null<NamedDecl>(Reader.GetDecl(PatternID));
1861 = Reader.ReadTemplateParameterList(F, Record, Idx);
1875 CanonD->Common = CanonD->newCommon(Reader.getContext());
1876 Reader.PendingDefinitions.insert(CanonD);
1933 Reader.getContext(), CommonPtr->LazySpecializations, SpecIDs);
1941 Reader.Context.getInjectedClassNameType(
1965 Reader.getContext(), CommonPtr->LazySpecializations, SpecIDs);
1975 ASTContext &C = Reader.getContext();
1981 Reader.ReadTemplateArgumentList(TemplArgs, F, Record, Idx);
1995 Reader.ReadTemplateArgumentList(TemplArgs, F, Record, Idx,
2049 D->TemplateParams = Reader.ReadTemplateParameterList(F, Record, Idx);
2050 D->ArgsAsWritten = Reader.ReadASTTemplateArgumentListInfo(F, Record, Idx);
2077 Reader.getContext(), CommonPtr->LazySpecializations, SpecIDs);
2092 ASTContext &C = Reader.getContext();
2098 Reader.ReadTemplateArgumentList(TemplArgs, F, Record, Idx);
2122 Reader.ReadTemplateArgumentList(TemplArgs, F, Record, Idx,
2155 D->TemplateParams = Reader.ReadTemplateParameterList(F, Record, Idx);
2156 D->ArgsAsWritten = Reader.ReadASTTemplateArgumentListInfo(F, Record, Idx);
2184 new (&TypesAndInfos[I].first) QualType(Reader.readType(F, Record, Idx));
2191 D->setDefaultArgument(Reader.ReadExpr(F));
2205 Data[I] = Reader.ReadTemplateParameterList(F, Record, Idx);
2210 D->setDefaultArgument(Reader.getContext(),
2211 Reader.ReadTemplateArgumentLoc(F, Record, Idx));
2221 D->AssertExprAndFailed.setPointer(Reader.ReadExpr(F));
2223 D->Message = cast<StringLiteral>(Reader.ReadExpr(F));
2276 T *FirstDecl = cast_or_null<T>(Reader.GetDecl(FirstDeclID));
2293 Reader.PendingDeclChains.push_back(std::make_pair(DAsT, RedeclOffset));
2307 if (!Reader.getContext().getLangOpts().Modules)
2352 Reader.PendingDefinitions.insert(DClass);
2407 Reader.KeyDecls[ExistingCanon].push_back(Redecl.getFirstID());
2418 if (!Reader.getContext().getLangOpts().Modules)
2424 if (!Reader.getContext().getLangOpts().CPlusPlus)
2429 Reader.Context.setPrimaryMergedDecl(static_cast<T*>(D),
2439 Vars.push_back(Reader.ReadExpr(F));
2446 D->setLocation(Reader.ReadSourceLocation(F, Record, Idx));
2447 D->setCombiner(Reader.ReadExpr(F));
2448 D->setInitializer(Reader.ReadExpr(F));
2449 D->PrevDeclInScope = Reader.ReadDeclID(F, Record, Idx);
2784 DeclContext *ASTDeclReader::getPrimaryContextForMerging(ASTReader &Reader,
2800 DD = new (Reader.Context) struct CXXRecordDecl::DefinitionData(RD);
2806 Reader.PendingFakeDefinitionData.insert(
2830 Reader.ImportedTypedefNamesForLinkage.insert(
2841 setAnonymousDeclForMerging(Reader, New->getLexicalDeclContext(),
2844 !Reader.getContext().getLangOpts().CPlusPlus) {
2845 if (Reader.getIdResolver().tryAddTopLevelDecl(New, Name))
2846 Reader.PendingFakeLookupResults[Name.getAsIdentifierInfo()]
2848 } else if (DeclContext *MergeDC = getPrimaryContextForMerging(Reader, DC)) {
2875 NamedDecl *ASTDeclReader::getAnonymousDeclForMerging(ASTReader &Reader,
2880 if (auto *Merged = Reader.MergedDeclContexts.lookup(DC))
2884 auto &Previous = Reader.AnonymousDeclarationsForMerging[DC];
2902 void ASTDeclReader::setAnonymousDeclForMerging(ASTReader &Reader,
2905 if (auto *Merged = Reader.MergedDeclContexts.lookup(DC))
2908 auto &Previous = Reader.AnonymousDeclarationsForMerging[DC];
2922 Reader, D, /*Existing=*/nullptr,
2930 auto It = Reader.ImportedTypedefNamesForLinkage.find(
2932 if (It != Reader.ImportedTypedefNamesForLinkage.end())
2934 return FindExistingResult(Reader, D, It->second, AnonymousDeclNumber,
2944 Reader, D->getLexicalDeclContext(), AnonymousDeclNumber))
2946 return FindExistingResult(Reader, D, Existing, AnonymousDeclNumber,
2949 !Reader.getContext().getLangOpts().CPlusPlus) {
2950 IdentifierResolver &IdResolver = Reader.getIdResolver();
2980 return FindExistingResult(Reader, D, Existing, AnonymousDeclNumber,
2983 } else if (DeclContext *MergeDC = getPrimaryContextForMerging(Reader, DC)) {
2988 return FindExistingResult(Reader, D, Existing, AnonymousDeclNumber,
2993 return FindExistingResult(Reader);
3001 auto MergedDCIt = Reader.MergedDeclContexts.find(D->getLexicalDeclContext());
3002 if (MergedDCIt != Reader.MergedDeclContexts.end() &&
3004 Reader.PendingOdrMergeChecks.push_back(D);
3006 return FindExistingResult(Reader, D, /*Existing=*/nullptr,
3036 void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader,
3045 void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader,
3084 Reader.PendingExceptionSpecUpdates.insert(
3090 void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, ...) {
3133 void ASTDeclReader::attachPreviousDecl(ASTReader &Reader, Decl *D,
3141 attachPreviousDeclImpl(Reader, cast<TYPE##Decl>(D), Previous, Canon); \
3158 inheritDefaultTemplateArguments(Reader.getContext(),
3221 ASTDeclReader Reader(*this, Loc, ID, DeclLoc, Record,Idx);
3450 Reader.Visit(D);
3455 std::pair<uint64_t, uint64_t> Offsets = Reader.VisitDeclContext(DC);
3477 if (isConsumerInterestedIn(D, Reader.hasPendingBody()))
3506 ASTDeclReader Reader(*this, RecordLocation(F, Offset), ID,
3508 Reader.UpdateDecl(D, *F, Record);
3513 isConsumerInterestedIn(D, Reader.hasPendingBody())) {
3530 reader::ASTDeclContextNameLookupTrait(*this, *Update.Mod));
3579 ASTReader &Reader;
3596 Reader.getOwningModuleFile(Existing)
3597 != Reader.getOwningModuleFile(Cat)) {
3609 Reader.Diag(Cat->getLocation(), diag::warn_dup_category_def)
3611 Reader.Diag(Existing->getLocation(), diag::note_previous_definition);
3627 ObjCCategoriesVisitor(ASTReader &Reader,
3632 : Reader(Reader), InterfaceID(InterfaceID), Interface(Interface),
3655 DeclID LocalID = Reader.mapGlobalIDToModuleFileGlobalID(M, InterfaceID);
3671 return Reader.isDeclIDFromModule(InterfaceID, M);
3680 Reader.GetLocalDecl(M, M.ObjCCategories[Offset++])));
3723 Decl *MD = Reader.ReadDecl(ModuleFile, Record, Idx);
3733 (void)Reader.ReadDecl(ModuleFile, Record, Idx);
3738 = Reader.ReadDeclAs<NamespaceDecl>(ModuleFile, Record, Idx);
3755 Reader.ReadSourceLocation(ModuleFile, Record, Idx));
3764 auto DefaultArg = Reader.ReadExpr(F);
3775 if (Reader.PendingBodies[FD]) {
3789 FD->setInnerLocStart(Reader.ReadSourceLocation(ModuleFile, Record, Idx));
3796 Reader.PendingBodies[FD] = GetCurrentCursorOffset();
3807 !Reader.PendingFakeDefinitionData.count(OldDD));
3813 Reader.ReadLexicalDeclContextStorage(ModuleFile, ModuleFile.DeclsCursor,
3815 Reader.PendingFakeDefinitionData.erase(OldDD);
3819 SourceLocation POI = Reader.ReadSourceLocation(ModuleFile, Record, Idx);
3834 Reader.ReadTemplateArgumentList(TemplArgs, F, Record, Idx);
3836 Reader.getContext(), TemplArgs);
3847 RD->setLocation(Reader.ReadSourceLocation(ModuleFile, Record, Idx));
3848 RD->setLocStart(Reader.ReadSourceLocation(ModuleFile, Record, Idx));
3849 RD->setRBraceLoc(Reader.ReadSourceLocation(ModuleFile, Record, Idx));
3853 Reader.ReadAttributes(F, Attrs, Record, Idx);
3854 D->setAttrsImpl(Attrs, Reader.getContext());
3862 auto *Del = Reader.ReadDeclAs<FunctionDecl>(ModuleFile, Record, Idx);
3873 Reader.readExceptionSpec(ModuleFile, ExceptionStorage, ESI, Record, Idx);
3881 FD->setType(Reader.Context.getFunctionType(
3887 Reader.PendingExceptionSpecUpdates.insert(
3895 QualType DeducedResultType = Reader.readType(ModuleFile, Record, Idx);
3899 Reader.Context.adjustDeducedFunctionResultType(FD, DeducedResultType);
3914 Reader.Context.setManglingNumber(cast<NamedDecl>(D), Record[Idx++]);
3918 Reader.Context.setStaticLocalNumber(cast<VarDecl>(D), Record[Idx++]);
3923 Reader.Context, ReadSourceRange(Record, Idx)));
3931 Module *Owner = SubmoduleID ? Reader.getSubmodule(SubmoduleID) : nullptr;
3932 if (Reader.getContext().getLangOpts().ModulesLocalVisibility) {
3935 Reader.getContext().mergeDefinitionIntoModule(
3938 Reader.PendingMergedDefinitionsToDeduplicate.insert(
3943 Reader.HiddenNamesMap[Owner].push_back(Exported);
3954 Reader.ReadAttributes(F, Attrs, Record, Idx);