Home | History | Annotate | Download | only in Serialization

Lines Matching full:record

526   // Detailed record is important since it is used for the module cache hash.
958 RecordData Record;
961 unsigned RecCode = Cursor.readRecord(Code, Record, &Blob);
975 RecordData Record;
978 unsigned RecCode = Cursor.readRecord(Code, Record, &Blob);
984 (const unsigned char *)Blob.data() + Record[0],
1016 SmallVectorImpl<uint64_t> &Record) {
1022 for (int I = 0, N = Record[Idx++]; I != N; ++I) {
1024 unsigned FilenameLen = Record[Idx++];
1025 std::string Filename(&Record[Idx], &Record[Idx] + FilenameLen);
1033 while (Idx < Record.size()) {
1034 int FID = Record[Idx++];
1040 unsigned NumEntries = Record[Idx++];
1045 unsigned FileOffset = Record[Idx++];
1046 unsigned LineNo = Record[Idx++];
1047 int FilenameID = FileIDs[Record[Idx++]];
1049 = (SrcMgr::CharacteristicKind)Record[Idx++];
1050 unsigned IncludeOffset = Record[Idx++];
1074 Error("malformed block record in AST file");
1080 Error("malformed source manager block record in AST file");
1084 RecordData Record;
1091 Error("malformed block record in AST file");
1095 case llvm::BitstreamEntry::Record:
1100 // Read a record.
1101 Record.clear();
1103 switch (SLocEntryCursor.readRecord(E.ID, Record, &Blob)) {
1165 if (Entry.Kind != llvm::BitstreamEntry::Record) {
1170 RecordData Record;
1172 switch (SLocEntryCursor.readRecord(Entry.ID, Record, &Blob)) {
1180 unsigned InputID = Record[4];
1191 SourceLocation IncludeLoc = ReadSourceLocation(*F, Record[1]);
1197 FileCharacter = (SrcMgr::CharacteristicKind)Record[2];
1199 ID, BaseOffset + Record[0]);
1202 FileInfo.NumCreatedFIDs = Record[5];
1203 if (Record[3])
1206 const DeclID *FirstDecl = F->FileSortedDecls + Record[6];
1207 unsigned NumFileDecls = Record[7];
1220 Record.clear();
1221 unsigned RecCode = SLocEntryCursor.readRecord(Code, Record, &Blob);
1224 Error("AST record has invalid code");
1238 unsigned Offset = Record[0];
1240 FileCharacter = (SrcMgr::CharacteristicKind)Record[2];
1241 SourceLocation IncludeLoc = ReadSourceLocation(*F, Record[1]);
1246 Record.clear();
1248 = SLocEntryCursor.readRecord(Code, Record, &Blob);
1251 Error("AST record has invalid code");
1263 SourceLocation SpellingLoc = ReadSourceLocation(*F, Record[1]);
1265 ReadSourceLocation(*F, Record[2]),
1266 ReadSourceLocation(*F, Record[3]),
1267 Record[4],
1269 BaseOffset + Record[0]);
1316 Error("malformed block record in AST file");
1333 Token ASTReader::ReadToken(ModuleFile &F, const RecordDataImpl &Record,
1337 Tok.setLocation(ReadSourceLocation(F, Record, Idx));
1338 Tok.setLength(Record[Idx++]);
1339 if (IdentifierInfo *II = getLocalIdentifier(F, Record[Idx++]))
1341 Tok.setKind((tok::TokenKind)Record[Idx++]);
1342 Tok.setFlag((Token::TokenFlags)Record[Idx++]);
1354 RecordData Record;
1359 // Advance to the next record, but if we get to the end of the block, don't
1368 Error("malformed block record in AST file");
1372 case llvm::BitstreamEntry::Record:
1377 // Read a record.
1378 Record.clear();
1380 (PreprocessorRecordTypes)Stream.readRecord(Entry.ID, Record);
1394 SubmoduleID SubModID = getGlobalSubmoduleID(F, Record[NextIndex++]);
1395 SourceLocation Loc = ReadSourceLocation(F, Record, NextIndex);
1397 MI->setDefinitionEndLoc(ReadSourceLocation(F, Record, NextIndex));
1398 MI->setIsUsed(Record[NextIndex++]);
1399 MI->setUsedForHeaderGuard(Record[NextIndex++]);
1403 bool isC99VarArgs = Record[NextIndex++];
1404 bool isGNUVarArgs = Record[NextIndex++];
1405 bool hasCommaPasting = Record[NextIndex++];
1407 unsigned NumArgs = Record[NextIndex++];
1409 MacroArgs.push_back(getLocalIdentifier(F, Record[NextIndex++]));
1424 if (NextIndex + 1 == Record.size() && PP.getPreprocessingRecord() &&
1425 Record[NextIndex]) {
1428 GlobalID = getGlobalPreprocessedEntityID(F, Record[NextIndex]);
1448 Token Tok = ReadToken(F, Record, Idx);
1594 RecordData Record;
1601 Error("malformed block record in AST file");
1606 case llvm::BitstreamEntry::Record:
1607 Record.clear();
1608 switch (Cursor.readRecord(E.ID, Record)) {
1614 getLocalIdentifier(**I, Record[0]);
1807 if (Entry.Kind != llvm::BitstreamEntry::Record) {
1808 Error("malformed block record in AST file");
1812 RecordData Record;
1814 (PreprocessorRecordTypes)Cursor.readRecord(Entry.ID, Record);
1816 Error("malformed block record in AST file");
1822 unsigned Idx = 0, N = Record.size();
1825 SourceLocation Loc = ReadSourceLocation(M, Record, Idx);
1826 MacroDirective::Kind K = (MacroDirective::Kind)Record[Idx++];
1829 Record[Idx++]);
1831 bool isImported = Record[Idx++];
1832 bool isAmbiguous = Record[Idx++];
1843 bool isPublic = Record[Idx++];
2026 RecordData Record;
2029 unsigned Result = Cursor.readRecord(Code, Record, &Blob);
2031 "invalid record type for input file");
2039 assert(Record[0] == ID && "Bogus stored ID or offset");
2040 StoredSize = static_cast<off_t>(Record[1]);
2041 StoredTime = static_cast<time_t>(Record[2]);
2042 Overridden = static_cast<bool>(Record[3]);
2105 // Record that we didn't find the file.
2222 Error("malformed block record in AST file");
2227 RecordData Record;
2233 Error("malformed block record in AST file");
2240 // All user input files reside at the index range [0, Record[1]), and
2241 // system input files reside at [Record[1], Record[0]).
2242 // Record is the one from INPUT_FILE_OFFSETS.
2243 unsigned NumInputs = Record[0];
2244 unsigned NumUserInputs = Record[1];
2290 Error("malformed block record in AST file");
2297 Error("malformed block record in AST file");
2303 case llvm::BitstreamEntry::Record:
2308 // Read and process a record.
2309 Record.clear();
2311 switch ((ControlRecordTypes)Stream.readRecord(Entry.ID, Record, &Blob)) {
2313 if (Record[0] != VERSION_MAJOR && !DisableValidation) {
2315 Diag(Record[0] < VERSION_MAJOR? diag::err_pch_version_too_old
2320 bool hasErrors = Record[5];
2326 F.RelocatablePCH = Record[4];
2340 unsigned Idx = 0, N = Record.size();
2343 ModuleKind ImportedKind = (ModuleKind)Record[Idx++];
2348 SourceLocation::getFromRawEncoding(Record[Idx++]);
2349 off_t StoredSize = (off_t)Record[Idx++];
2350 time_t StoredModTime = (time_t)Record[Idx++];
2351 unsigned Length = Record[Idx++];
2352 SmallString<128> ImportedFile(Record.begin() + Idx,
2353 Record.begin() + Idx + Length);
2376 ParseLanguageOptions(Record, Complain, *Listener) &&
2385 ParseTargetOptions(Record, Complain, *Listener) &&
2394 ParseDiagnosticOptions(Record, Complain, *Listener) &&
2403 ParseFileSystemOptions(Record, Complain, *Listener) &&
2412 ParseHeaderSearchOptions(Record, Complain, *Listener) &&
2421 ParsePreprocessorOptions(Record, Complain, *Listener,
2429 F.OriginalSourceFileID = FileID::get(Record[0]);
2436 F.OriginalSourceFileID = FileID::get(Record[0]);
2488 F.InputFilesLoaded.resize(Record[0]);
2499 Error("malformed block record in AST file");
2504 RecordData Record;
2536 Error("malformed block record in AST file");
2548 Error("malformed block record in AST file");
2559 Error("malformed preprocessor detail record in AST file");
2594 Error("malformed block record in AST file");
2601 case llvm::BitstreamEntry::Record:
2606 // Read and process a record.
2607 Record.clear();
2609 switch ((ASTRecordTypes)Stream.readRecord(Entry.ID, Record, &Blob)) {
2615 Error("duplicate TYPE_OFFSET record in AST file");
2619 F.LocalNumTypes = Record[0];
2620 unsigned LocalBaseTypeIndex = Record[1];
2639 Error("duplicate DECL_OFFSET record in AST file");
2643 F.LocalNumDecls = Record[0];
2644 unsigned LocalBaseDeclID = Record[1];
2679 serialization::DeclID ID = ReadDeclID(F, Record, Idx);
2682 (const unsigned char *)Blob.data() + Record[Idx++],
2700 if (Record[0]) {
2702 (const unsigned char *)F.IdentifierTableData + Record[0],
2713 Error("duplicate IDENTIFIER_OFFSET record in AST file");
2717 F.LocalNumIdentifiers = Record[0];
2718 unsigned LocalBaseIdentifierID = Record[1];
2740 for (unsigned I = 0, N = Record.size(); I != N; ++I)
2741 EagerlyDeserializedDecls.push_back(getGlobalDeclID(F, Record[I]));
2746 for (unsigned I = 0, N = Record.size(); I != N; ++I)
2747 SpecialTypes.push_back(getGlobalTypeID(F, Record[I]));
2751 if (SpecialTypes.size() != Record.size()) {
2752 Error("invalid special-types record");
2756 for (unsigned I = 0, N = Record.size(); I != N; ++I) {
2757 serialization::TypeID ID = getGlobalTypeID(F, Record[I]);
2766 TotalNumStatements += Record[0];
2767 TotalNumMacros += Record[1];
2768 TotalLexicalDeclContexts += Record[2];
2769 TotalVisibleDeclContexts += Record[3];
2773 for (unsigned I = 0, N = Record.size(); I != N; ++I)
2774 UnusedFileScopedDecls.push_back(getGlobalDeclID(F, Record[I]));
2778 for (unsigned I = 0, N = Record.size(); I != N; ++I)
2779 DelegatingCtorDecls.push_back(getGlobalDeclID(F, Record[I]));
2783 if (Record.size() % 4 != 0) {
2784 Error("invalid weak identifiers record");
2793 for (unsigned I = 0, N = Record.size(); I < N; /* in loop */) {
2795 getGlobalIdentifierID(F, Record[I++]));
2797 getGlobalIdentifierID(F, Record[I++]));
2799 ReadSourceLocation(F, Record, I).getRawEncoding());
2800 WeakUndeclaredIdentifiers.push_back(Record[I++]);
2805 for (unsigned I = 0, N = Record.size(); I != N; ++I)
2806 LocallyScopedExternCDecls.push_back(getGlobalDeclID(F, Record[I]));
2811 F.LocalNumSelectors = Record[0];
2812 unsigned LocalBaseSelectorID = Record[1];
2833 if (Record[0])
2836 F.SelectorLookupTableData + Record[0],
2839 TotalNumMethodPoolEntries += Record[1];
2843 if (!Record.empty()) {
2844 for (unsigned Idx = 0, N = Record.size() - 1; Idx < N; /* in loop */) {
2846 Record[Idx++]));
2847 ReferencedSelectorsData.push_back(ReadSourceLocation(F, Record, Idx).
2854 if (!Record.empty() && Listener)
2855 Listener->ReadCounter(F, Record[0]);
2860 F.NumFileSortedDecls = Record[0];
2865 F.LocalNumSLocEntries = Record[0];
2866 unsigned SLocSpaceSize = Record[1];
2977 if (ParseLineTable(F, Record))
2989 F.PreloadSLocEntries.swap(Record);
2994 for (unsigned I = 0, N = Record.size(); I != N; ++I)
2995 ExtVectorDecls.push_back(getGlobalDeclID(F, Record[I]));
2999 if (Record.size() % 3 != 0) {
3000 Error("Invalid VTABLE_USES record");
3009 for (unsigned Idx = 0, N = Record.size(); Idx != N; /* In loop */) {
3010 VTableUses.push_back(getGlobalDeclID(F, Record[Idx++]));
3012 ReadSourceLocation(F, Record, Idx).getRawEncoding());
3013 VTableUses.push_back(Record[Idx++]);
3018 for (unsigned I = 0, N = Record.size(); I != N; ++I)
3019 DynamicClasses.push_back(getGlobalDeclID(F, Record[I]));
3028 if (Record.size() % 2 != 0) {
3033 for (unsigned I = 0, N = Record.size(); I != N; /* in loop */) {
3034 PendingInstantiations.push_back(getGlobalDeclID(F, Record[I++]));
3036 ReadSourceLocation(F, Record, I).getRawEncoding());
3041 if (Record.size() != 2) {
3045 for (unsigned I = 0, N = Record.size(); I != N; ++I)
3046 SemaDeclRefs.push_back(getGlobalDeclID(F, Record[I]));
3054 unsigned LocalBasePreprocessedEntityID = Record[0];
3082 if (Record.size() % 2 != 0) {
3086 for (unsigned I = 0, N = Record.size(); I != N; I += 2) {
3087 GlobalDeclID ID = getGlobalDeclID(F, Record[I]);
3088 DeclUpdateOffsets[ID].push_back(std::make_pair(&F, Record[I + 1]));
3099 if (Record.size() % 3 != 0) {
3103 for (unsigned I = 0, N = Record.size(); I != N; I += 3)
3104 ReplacedDecls[getGlobalDeclID(F, Record[I])]
3105 = ReplacedDeclInfo(&F, Record[I+1], Record[I+2]);
3111 Error("duplicate OBJC_CATEGORIES_MAP record in AST file");
3115 F.LocalNumObjCCategoriesInMap = Record[0];
3121 F.ObjCCategories.swap(Record);
3126 Error("duplicate CXX_BASE_SPECIFIER_OFFSETS record in AST file");
3130 F.LocalNumCXXBaseSpecifiers = Record[0];
3138 F.PragmaDiagMappings.swap(Record);
3141 Record.begin(), Record.end());
3148 for (unsigned I = 0, N = Record.size(); I != N; ++I)
3149 CUDASpecialDeclRefs.push_back(getGlobalDeclID(F, Record[I]));
3154 F.LocalNumHeaderFileInfos = Record[1];
3155 if (Record[0]) {
3158 (const unsigned char *)F.HeaderFileInfoTableData + Record[0],
3162 Blob.data() + Record[2]));
3173 FPPragmaOptions.swap(Record);
3178 OpenCLExtensions.swap(Record);
3182 for (unsigned I = 0, N = Record.size(); I != N; ++I)
3183 TentativeDefinitions.push_back(getGlobalDeclID(F, Record[I]));
3187 for (unsigned I = 0, N = Record.size(); I != N; ++I)
3188 KnownNamespaces.push_back(getGlobalDeclID(F, Record[I]));
3197 if (Record.size() % 2 != 0) {
3198 Error("invalid undefined-but-used record");
3201 for (unsigned I = 0, N = Record.size(); I != N; /* in loop */) {
3202 UndefinedButUsed.push_back(getGlobalDeclID(F, Record[I++]));
3204 ReadSourceLocation(F, Record, I).getRawEncoding());
3213 for (unsigned I = 0, N = Record.size(); I != N; /**/) {
3214 unsigned GlobalID = getGlobalSubmoduleID(F, Record[I++]);
3215 SourceLocation Loc = ReadSourceLocation(F, Record, I);
3224 F.RedeclarationChains.swap(Record);
3230 Error("duplicate LOCAL_REDECLARATIONS_MAP record in AST file");
3234 F.LocalNumRedeclarationsInMap = Record[0];
3240 for (unsigned Idx = 0; Idx < Record.size(); /* increment in loop */) {
3241 GlobalDeclID CanonID = getGlobalDeclID(F, Record[Idx++]);
3243 for (unsigned N = Record[Idx++]; N > 0; --N)
3244 Decls.push_back(getGlobalDeclID(F, Record[Idx++]));
3251 Error("duplicate MACRO_OFFSET record in AST file");
3255 F.LocalNumMacros = Record[0];
3256 unsigned LocalBaseMacroID = Record[1];
3279 LateParsedTemplates.append(Record.begin(), Record.end());
3284 if (Record.size() != 1) {
3285 Error("invalid pragma optimize record");
3288 OptimizeOffPragmaLocation = ReadSourceLocation(F, Record[0]);
3709 case llvm::BitstreamEntry::Record:
3710 Error("invalid record at top-level of AST file");
3746 // Record that we've loaded this module.
3752 Error("malformed block record in AST file");
3916 case llvm::BitstreamEntry::Record:
3973 RecordData Record;
3979 if (Entry.Kind != llvm::BitstreamEntry::Record) {
3984 Record.clear();
3986 if (Stream.readRecord(Entry.ID, Record, &Blob) == ORIGINAL_FILE)
4080 RecordData Record;
4086 if (Entry.Kind != llvm::BitstreamEntry::Record)
4089 Record.clear();
4091 unsigned RecCode = Stream.readRecord(Entry.ID, Record, &Blob);
4094 if (Record[0] != VERSION_MAJOR)
4109 if (ParseLanguageOptions(Record, false, Listener))
4114 if (ParseTargetOptions(Record, false, Listener))
4119 if (ParseDiagnosticOptions(Record, false, Listener))
4124 if (ParseFileSystemOptions(Record, false, Listener))
4129 if (ParseHeaderSearchOptions(Record, false, Listener))
4135 if (ParsePreprocessorOptions(Record, false, Listener,
4145 unsigned NumInputFiles = Record[0];
4146 unsigned NumUserFiles = Record[1];
4160 RecordData Record;
4163 switch ((InputFileRecordTypes)Cursor.readRecord(Code, Record, &Blob)) {
4165 bool Overridden = static_cast<bool>(Record[3]);
4196 Error("malformed submodule block record in AST file");
4203 RecordData Record;
4210 Error("malformed block record in AST file");
4214 case llvm::BitstreamEntry::Record:
4219 // Read a record.
4221 Record.clear();
4222 switch (F.Stream.readRecord(Entry.ID, Record, &Blob)) {
4228 Error("missing submodule metadata record at beginning of block");
4232 if (Record.size() < 8) {
4239 SubmoduleID GlobalID = getGlobalSubmoduleID(F, Record[Idx++]);
4240 SubmoduleID Parent = getGlobalSubmoduleID(F, Record[Idx++]);
4241 bool IsFramework = Record[Idx++];
4242 bool IsExplicit = Record[Idx++];
4243 bool IsSystem = Record[Idx++];
4244 bool IsExternC = Record[Idx++];
4245 bool InferSubmodules = Record[Idx++];
4246 bool InferExplicitSubmodules = Record[Idx++];
4247 bool InferExportWildcard = Record[Idx++];
4248 bool ConfigMacrosExhaustive = Record[Idx++];
4310 Error("missing submodule metadata record at beginning of block");
4331 Error("missing submodule metadata record at beginning of block");
4346 Error("missing submodule metadata record at beginning of block");
4361 Error("missing submodule metadata record at beginning of block");
4376 Error("missing submodule metadata record at beginning of block");
4389 Error("missing submodule metadata record at beginning of block");
4411 Error("submodule metadata record not at beginning of block");
4417 F.LocalNumSubmodules = Record[0];
4418 unsigned LocalBaseSubmoduleID = Record[1];
4437 Error("missing submodule metadata record at beginning of block");
4444 for (unsigned Idx = 0; Idx != Record.size(); ++Idx) {
4448 Unresolved.ID = Record[Idx];
4458 Error("missing submodule metadata record at beginning of block");
4465 for (unsigned Idx = 0; Idx + 1 < Record.size(); Idx += 2) {
4469 Unresolved.ID = Record[Idx];
4471 Unresolved.IsWildcard = Record[Idx + 1];
4482 Error("missing submodule metadata record at beginning of block");
4489 CurrentModule->addRequirement(Blob, Record[0], Context.getLangOpts(),
4496 Error("missing submodule metadata record at beginning of block");
4504 Module::LinkLibrary(Blob, Record[0]));
4509 Error("missing submodule metadata record at beginning of block");
4521 Error("missing submodule metadata record at beginning of block");
4531 Unresolved.ID = Record[0];
4542 /// \brief Parse the record that corresponds to a LangOptions data
4549 bool ASTReader::ParseLanguageOptions(const RecordData &Record,
4555 LangOpts.Name = Record[Idx++];
4557 LangOpts.set##Name(static_cast<LangOptions::Type>(Record[Idx++]));
4559 #define SANITIZER(NAME, ID) LangOpts.Sanitize.ID = Record[Idx++];
4562 ObjCRuntime::Kind runtimeKind = (ObjCRuntime::Kind) Record[Idx++];
4563 VersionTuple runtimeVersion = ReadVersionTuple(Record, Idx);
4566 unsigned Length = Record[Idx++];
4567 LangOpts.CurrentModule.assign(Record.begin() + Idx,
4568 Record.begin() + Idx + Length);
4573 for (unsigned N = Record[Idx++]; N; --N) {
4575 ReadString(Record, Idx));
4577 LangOpts.CommentOpts.ParseAllComments = Record[Idx++];
4582 bool ASTReader::ParseTargetOptions(const RecordData &Record,
4587 TargetOpts.Triple = ReadString(Record, Idx);
4588 TargetOpts.CPU = ReadString(Record, Idx);
4589 TargetOpts.ABI = ReadString(Record, Idx);
4590 for (unsigned N = Record[Idx++]; N; --N) {
4591 TargetOpts.FeaturesAsWritten.push_back(ReadString(Record, Idx));
4593 for (unsigned N = Record[Idx++]; N; --N) {
4594 TargetOpts.Features.push_back(ReadString(Record, Idx));
4600 bool ASTReader::ParseDiagnosticOptions(const RecordData &Record, bool Complain,
4604 #define DIAGOPT(Name, Bits, Default) DiagOpts->Name = Record[Idx++];
4606 DiagOpts->set##Name(static_cast<Type>(Record[Idx++]));
4609 for (unsigned N = Record[Idx++]; N; --N) {
4610 DiagOpts->Warnings.push_back(ReadString(Record, Idx));
4616 bool ASTReader::ParseFileSystemOptions(const RecordData &Record, bool Complain,
4620 FSOpts.WorkingDir = ReadString(Record, Idx);
4624 bool ASTReader::ParseHeaderSearchOptions(const RecordData &Record,
4629 HSOpts.Sysroot = ReadString(Record, Idx);
4632 for (unsigned N = Record[Idx++]; N; --N) {
4633 std::string Path = ReadString(Record, Idx);
4635 = static_cast<frontend::IncludeDirGroup>(Record[Idx++]);
4636 bool IsFramework = Record[Idx++];
4637 bool IgnoreSysRoot = Record[Idx++];
4643 for (unsigned N = Record[Idx++]; N; --N) {
4644 std::string Prefix = ReadString(Record, Idx);
4645 bool IsSystemHeader = Record[Idx++];
4650 HSOpts.ResourceDir = ReadString(Record, Idx);
4651 HSOpts.ModuleCachePath = ReadString(Record, Idx);
4652 HSOpts.ModuleUserBuildPath = ReadString(Record, Idx);
4653 HSOpts.DisableModuleHash = Record[Idx++];
4654 HSOpts.UseBuiltinIncludes = Record[Idx++];
4655 HSOpts.UseStandardSystemIncludes = Record[Idx++];
4656 HSOpts.UseStandardCXXIncludes = Record[Idx++];
4657 HSOpts.UseLibcxx = Record[Idx++];
4662 bool ASTReader::ParsePreprocessorOptions(const RecordData &Record,
4670 for (unsigned N = Record[Idx++]; N; --N) {
4671 std::string Macro = ReadString(Record, Idx);
4672 bool IsUndef = Record[Idx++];
4677 for (unsigned N = Record[Idx++]; N; --N) {
4678 PPOpts.Includes.push_back(ReadString(Record, Idx));
4682 for (unsigned N = Record[Idx++]; N; --N) {
4683 PPOpts.MacroIncludes.push_back(ReadString(Record, Idx));
4686 PPOpts.UsePredefines = Record[Idx++];
4687 PPOpts.DetailedRecord = Record[Idx++];
4688 PPOpts.ImplicitPCHInclude = ReadString(Record, Idx);
4689 PPOpts.ImplicitPTHInclude = ReadString(Record, Idx);
4691 static_cast<ObjCXXARCStandardLibraryKind>(Record[Idx++]);
4733 Error("no preprocessing record");
4742 if (Entry.Kind != llvm::BitstreamEntry::Record)
4745 // Read the record.
4750 RecordData Record;
4753 Entry.ID, Record, &Blob);
4756 bool isBuiltin = Record[0];
4760 Name = getLocalIdentifier(M, Record[1]);
4763 GlobalID = getGlobalPreprocessedEntityID(M, Record[1]);
4779 IdentifierInfo *II = getLocalIdentifier(M, Record[0]);
4790 const char *FullFileNameStart = Blob.data() + Record[0];
4791 StringRef FullFileName(FullFileNameStart, Blob.size() - Record[0]);
4798 = static_cast<InclusionDirective::InclusionKind>(Record[2]);
4801 StringRef(Blob.data(), Record[0]),
4802 Record[1], Record[3],
5047 /// routine actually reads the record corresponding to the type at the given
5060 // Note that we are loading a type record.
5065 RecordData Record;
5067 switch ((TypeCode)DeclsCursor.readRecord(Code, Record)) {
5069 if (Record.size() != 2) {
5073 QualType Base = readType(*Loc.F, Record, Idx);
5074 Qualifiers Quals = Qualifiers::fromOpaqueValue(Record[Idx++]);
5079 if (Record.size() != 1) {
5083 QualType ElemType = readType(*Loc.F, Record, Idx);
5088 if (Record.size() != 1) {
5092 QualType PointeeType = readType(*Loc.F, Record, Idx);
5097 if (Record.size() != 1) {
5101 QualType OriginalType = readType(*Loc.F, Record, Idx);
5109 if (Record.size() != 2) {
5113 QualType OriginalTy = readType(*Loc.F, Record, Idx);
5114 QualType AdjustedTy = readType(*Loc.F, Record, Idx);
5119 if (Record.size() != 1) {
5123 QualType PointeeType = readType(*Loc.F, Record, Idx);
5128 if (Record.size() != 2) {
5132 QualType PointeeType = readType(*Loc.F, Record, Idx);
5133 return Context.getLValueReferenceType(PointeeType, Record[1]);
5137 if (Record.size() != 1) {
5141 QualType PointeeType = readType(*Loc.F, Record, Idx);
5146 if (Record.size() != 2) {
5150 QualType PointeeType = readType(*Loc.F, Record, Idx);
5151 QualType ClassType = readType(*Loc.F, Record, Idx);
5159 QualType ElementType = readType(*Loc.F, Record, Idx);
5160 ArrayType::ArraySizeModifier ASM = (ArrayType::ArraySizeModifier)Record[1];
5161 unsigned IndexTypeQuals = Record[2];
5163 llvm::APInt Size = ReadAPInt(Record, Idx);
5169 QualType ElementType = readType(*Loc.F, Record, Idx);
5170 ArrayType::ArraySizeModifier ASM = (ArrayType::ArraySizeModifier)Record[1];
5171 unsigned IndexTypeQuals = Record[2];
5176 QualType ElementType = readType(*Loc.F, Record, Idx);
5177 ArrayType::ArraySizeModifier ASM = (ArrayType::ArraySizeModifier)Record[1];
5178 unsigned IndexTypeQuals = Record[2];
5179 SourceLocation LBLoc = ReadSourceLocation(*Loc.F, Record[3]);
5180 SourceLocation RBLoc = ReadSourceLocation(*Loc.F, Record[4]);
5187 if (Record.size() != 3) {
5192 QualType ElementType = readType(*Loc.F, Record, Idx);
5193 unsigned NumElements = Record[1];
5194 unsigned VecKind = Record[2];
5200 if (Record.size() != 3) {
5205 QualType ElementType = readType(*Loc.F, Record, Idx);
5206 unsigned NumElements = Record[1];
5211 if (Record.size() != 6) {
5215 QualType ResultType = readType(*Loc.F, Record, Idx);
5216 FunctionType::ExtInfo Info(Record[1], Record[2], Record[3],
5217 (CallingConv)Record[4], Record[5]);
5222 QualType ResultType = readType(*Loc.F, Record, Idx);
5225 EPI.ExtInfo = FunctionType::ExtInfo(/*noreturn*/ Record[1],
5226 /*hasregparm*/ Record[2],
5227 /*regparm*/ Record[3],
5228 static_cast<CallingConv>(Record[4]),
5229 /*produces*/ Record[5]);
5232 unsigned NumParams = Record[Idx++];
5235 ParamTypes.push_back(readType(*Loc.F, Record, Idx));
5237 EPI.Variadic = Record[Idx++];
5238 EPI.HasTrailingReturn = Record[Idx++];
5239 EPI.TypeQuals = Record[Idx++];
5240 EPI.RefQualifier = static_cast<RefQualifierKind>(Record[Idx++]);
5242 readExceptionSpec(*Loc.F, ExceptionStorage, EPI, Record, Idx);
5249 ReadDeclAs<UnresolvedUsingTypenameDecl>(*Loc.F, Record, Idx));
5253 if (Record.size() != 2) {
5258 TypedefNameDecl *Decl = ReadDeclAs<TypedefNameDecl>(*Loc.F, Record, Idx);
5259 QualType Canonical = readType(*Loc.F, Record, Idx);
5269 if (Record.size() != 1) {
5273 QualType UnderlyingType = readType(*Loc.F, Record, Idx);
5278 QualType UnderlyingType = readType(*Loc.F, Record, Idx);
5283 QualType BaseType = readType(*Loc.F, Record, Idx);
5284 QualType UnderlyingType = readType(*Loc.F, Record, Idx);
5285 UnaryTransformType::UTTKind UKind = (UnaryTransformType::UTTKind)Record[2];
5290 QualType Deduced = readType(*Loc.F, Record, Idx);
5291 bool IsDecltypeAuto = Record[Idx++];
5292 bool IsDependent = Deduced.isNull() ? Record[Idx++] : false;
5297 if (Record.size() != 2) {
5298 Error("incorrect encoding of record type");
5302 bool IsDependent = Record[Idx++];
5303 RecordDecl *RD = ReadDeclAs<RecordDecl>(*Loc.F, Record, Idx);
5311 if (Record.size() != 2) {
5316 bool IsDependent = Record[Idx++];
5318 = Context.getEnumType(ReadDeclAs<EnumDecl>(*Loc.F, Record, Idx));
5324 if (Record.size() != 3) {
5328 QualType modifiedType = readType(*Loc.F, Record, Idx);
5329 QualType equivalentType = readType(*Loc.F, Record, Idx);
5330 AttributedType::Kind kind = static_cast<AttributedType::Kind>(Record[2]);
5335 if (Record.size() != 1) {
5339 QualType InnerType = readType(*Loc.F, Record, Idx);
5344 if (Record.size() != 2) {
5348 QualType Pattern = readType(*Loc.F, Record, Idx);
5352 if (Record[1])
5353 NumExpansions = Record[1] - 1;
5359 ElaboratedTypeKeyword Keyword = (ElaboratedTypeKeyword)Record[Idx++];
5360 NestedNameSpecifier *NNS = ReadNestedNameSpecifier(*Loc.F, Record, Idx);
5361 QualType NamedType = readType(*Loc.F, Record, Idx);
5368 = ReadDeclAs<ObjCInterfaceDecl>(*Loc.F, Record, Idx);
5374 QualType Base = readType(*Loc.F, Record, Idx);
5375 unsigned NumProtos = Record[Idx++];
5378 Protos.push_back(ReadDeclAs<ObjCProtocolDecl>(*Loc.F, Record, Idx));
5384 QualType Pointee = readType(*Loc.F, Record, Idx);
5390 QualType Parm = readType(*Loc.F, Record, Idx);
5391 QualType Replacement = readType(*Loc.F, Record, Idx);
5399 QualType Parm = readType(*Loc.F, Record, Idx);
5400 TemplateArgument ArgPack = ReadTemplateArgument(*Loc.F, Record, Idx);
5407 CXXRecordDecl *D = ReadDeclAs<CXXRecordDecl>(*Loc.F, Record, Idx);
5408 QualType TST = readType(*Loc.F, Record, Idx); // probably derivable
5423 unsigned Depth = Record[Idx++];
5424 unsigned Index = Record[Idx++];
5425 bool Pack = Record[Idx++];
5427 = ReadDeclAs<TemplateTypeParmDecl>(*Loc.F, Record, Idx);
5433 ElaboratedTypeKeyword Keyword = (ElaboratedTypeKeyword)Record[Idx++];
5434 NestedNameSpecifier *NNS = ReadNestedNameSpecifier(*Loc.F, Record, Idx);
5435 const IdentifierInfo *Name = this->GetIdentifierInfo(*Loc.F, Record, Idx);
5436 QualType Canon = readType(*Loc.F, Record, Idx);
5444 ElaboratedTypeKeyword Keyword = (ElaboratedTypeKeyword)Record[Idx++];
5445 NestedNameSpecifier *NNS = ReadNestedNameSpecifier(*Loc.F, Record, Idx);
5446 const IdentifierInfo *Name = this->GetIdentifierInfo(*Loc.F, Record, Idx);
5447 unsigned NumArgs = Record[Idx++];
5451 Args.push_back(ReadTemplateArgument(*Loc.F, Record, Idx));
5460 QualType ElementType = readType(*Loc.F, Record, Idx);
5462 = (ArrayType::ArraySizeModifier)Record[Idx++];
5463 unsigned IndexTypeQuals = Record[Idx++];
5467 SourceRange Brackets = ReadSourceRange(*Loc.F, Record, Idx);
5475 bool IsDependent = Record[Idx++];
5476 TemplateName Name = ReadTemplateName(*Loc.F, Record, Idx);
5478 ReadTemplateArgumentList(Args, *Loc.F, Record, Idx);
5479 QualType Underlying = readType(*Loc.F, Record, Idx);
5492 if (Record.size() != 1) {
5496 QualType ValueType = readType(*Loc.F, Record, Idx);
5506 const RecordData &Record, unsigned &Idx) {
5508 static_cast<ExceptionSpecificationType>(Record[Idx++]);
5511 EPI.NumExceptions = Record[Idx++];
5513 Exceptions.push_back(readType(ModuleFile, Record, Idx));
5518 EPI.ExceptionSpecDecl = ReadDeclAs<FunctionDecl>(ModuleFile, Record, Idx);
5520 ReadDeclAs<FunctionDecl>(ModuleFile, Record, Idx);
5522 EPI.ExceptionSpecDecl = ReadDeclAs<FunctionDecl>(ModuleFile, Record, Idx);
5529 const ASTReader::RecordData &Record;
5538 T *ReadDeclAs(const ASTReader::RecordData &Record, unsigned &Idx) {
5539 return Reader.ReadDeclAs<T>(F, Record, Idx);
5544 const ASTReader::RecordData &Record, unsigned &Idx)
5545 : Reader(Reader), F(F), Record(Record), Idx(Idx)
5564 TL.setBuiltinLoc(ReadSourceLocation(Record, Idx));
5566 TL.setWrittenTypeSpec(static_cast<DeclSpec::TST>(Record[Idx++]));
5567 TL.setWrittenSignSpec(static_cast<DeclSpec::TSS>(Record[Idx++]));
5568 TL.setWrittenWidthSpec(static_cast<DeclSpec::TSW>(Record[Idx++]));
5569 TL.setModeAttr(Record[Idx++]);
5573 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5576 TL.setStarLoc(ReadSourceLocation(Record, Idx));
5585 Record, Idx));
5588 TL.setAmpLoc(ReadSourceLocation(Record, Idx));
5591 TL.setAmpAmpLoc(ReadSourceLocation(Record, Idx));
5594 TL.setStarLoc(ReadSourceLocation(Record, Idx));
5595 TL.setClassTInfo(Reader.GetTypeSourceInfo(F, Record, Idx));
5598 TL.setLBracketLoc(ReadSourceLocation(Record, Idx));
5599 TL.setRBracketLoc(ReadSourceLocation(Record, Idx));
5600 if (Record[Idx++])
5620 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5623 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5626 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5629 TL.setLocalRangeBegin(ReadSourceLocation(Record, Idx));
5630 TL.setLParenLoc(ReadSourceLocation(Record, Idx));
5631 TL.setRParenLoc(ReadSourceLocation(Record, Idx));
5632 TL.setLocalRangeEnd(ReadSourceLocation(Record, Idx));
5634 TL.setParam(i, ReadDeclAs<ParmVarDecl>(Record, Idx));
5644 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5647 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5650 TL.setTypeofLoc(ReadSourceLocation(Record, Idx));
5651 TL.setLParenLoc(ReadSourceLocation(Record, Idx));
5652 TL.setRParenLoc(ReadSourceLocation(Record, Idx));
5655 TL.setTypeofLoc(ReadSourceLocation(Record, Idx));
5656 TL.setLParenLoc(ReadSourceLocation(Record, Idx));
5657 TL.setRParenLoc(ReadSourceLocation(Record, Idx));
5658 TL.setUnderlyingTInfo(Reader.GetTypeSourceInfo(F, Record, Idx));
5661 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5664 TL.setKWLoc(ReadSourceLocation(Record, Idx));
5665 TL.setLParenLoc(ReadSourceLocation(Record, Idx));
5666 TL.setRParenLoc(ReadSourceLocation(Record, Idx));
5667 TL.setUnderlyingTInfo(Reader.GetTypeSourceInfo(F, Record, Idx));
5670 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5673 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5676 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5679 TL.setAttrNameLoc(ReadSourceLocation(Record, Idx));
5682 range.setBegin(ReadSourceLocation(Record, Idx));
5683 range.setEnd(ReadSourceLocation(Record, Idx));
5687 if (Record[Idx++])
5692 TL.setAttrEnumOperandLoc(ReadSourceLocation(Record, Idx));
5695 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5699 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5703 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5707 TL.setTemplateKeywordLoc(ReadSourceLocation(Record, Idx));
5708 TL.setTemplateNameLoc(ReadSourceLocation(Record, Idx));
5709 TL.setLAngleLoc(ReadSourceLocation(Record, Idx));
5710 TL.setRAngleLoc(ReadSourceLocation(Record, Idx));
5715 Record, Idx));
5718 TL.setLParenLoc(ReadSourceLocation(Record, Idx));
5719 TL.setRParenLoc(ReadSourceLocation(Record, Idx));
5722 TL.setElaboratedKeywordLoc(ReadSourceLocation(Record, Idx));
5723 TL.setQualifierLoc(Reader.ReadNestedNameSpecifierLoc(F, Record, Idx));
5726 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5729 TL.setElaboratedKeywordLoc(ReadSourceLocation(Record, Idx));
5730 TL.setQualifierLoc(Reader.ReadNestedNameSpecifierLoc(F, Record, Idx));
5731 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5735 TL.setElaboratedKeywordLoc(ReadSourceLocation(Record, Idx));
5736 TL.setQualifierLoc(Reader.ReadNestedNameSpecifierLoc(F, Record, Idx));
5737 TL.setTemplateKeywordLoc(ReadSourceLocation(Record, Idx));
5738 TL.setTemplateNameLoc(ReadSourceLocation(Record, Idx));
5739 TL.setLAngleLoc(ReadSourceLocation(Record, Idx));
5740 TL.setRAngleLoc(ReadSourceLocation(Record, Idx));
5745 Record, Idx));
5748 TL.setEllipsisLoc(ReadSourceLocation(Record, Idx));
5751 TL.setNameLoc(ReadSourceLocation(Record, Idx));
5754 TL.setHasBaseTypeAsWritten(Record[Idx++]);
5755 TL.setLAngleLoc(ReadSourceLocation(Record, Idx));
5756 TL.setRAngleLoc(ReadSourceLocation(Record, Idx));
5758 TL.setProtocolLoc(i, ReadSourceLocation(Record, Idx));
5761 TL.setStarLoc(ReadSourceLocation(Record, Idx));
5764 TL.setKWLoc(ReadSourceLocation(Record, Idx));
5765 TL.setLParenLoc(ReadSourceLocation(Record, Idx));
5766 TL.setRParenLoc(ReadSourceLocation(Record, Idx));
5770 const RecordData &Record,
5772 QualType InfoTy = readType(F, Record, Idx);
5777 TypeLocReader TLR(*this, F, Record, Idx);
5898 const RecordData &Record,
5904 return GetTypeSourceInfo(F, Record, Index);
5906 NestedNameSpecifierLoc QualifierLoc = ReadNestedNameSpecifierLoc(F, Record,
5908 SourceLocation TemplateNameLoc = ReadSourceLocation(F, Record, Index);
5913 NestedNameSpecifierLoc QualifierLoc = ReadNestedNameSpecifierLoc(F, Record,
5915 SourceLocation TemplateNameLoc = ReadSourceLocation(F, Record, Index);
5916 SourceLocation EllipsisLoc = ReadSourceLocation(F, Record, Index);
5933 const RecordData &Record, unsigned &Index) {
5934 TemplateArgument Arg = ReadTemplateArgument(F, Record, Index);
5937 if (Record[Index++]) // bool InfoHasSameExpr.
5941 Record, Index));
5946 const RecordData &Record,
5948 SourceLocation LAngleLoc = ReadSourceLocation(F, Record, Index);
5949 SourceLocation RAngleLoc = ReadSourceLocation(F, Record, Index);
5950 unsigned NumArgsAsWritten = Record[Index++];
5953 TemplArgsInfo.addArgument(ReadTemplateArgumentLoc(F, Record, Index));
6002 const RecordData &Record,
6004 if (Idx >= Record.size() || Record[Idx] > M.LocalNumCXXBaseSpecifiers) {
6009 unsigned LocalID = Record[Idx++];
6019 RecordData Record;
6021 unsigned RecCode = Cursor.readRecord(Code, Record);
6028 unsigned NumBases = Record[Idx++];
6032 Bases[I] = ReadCXXBaseSpecifier(*Loc.F, Record, Idx);
6167 const RecordData &Record,
6169 if (Idx >= Record.size()) {
6174 return getGlobalDeclID(F, Record[Idx++]);
6396 // Record this declaration.
6523 // Record this declaration.
7144 VT.Record = dyn_cast_or_null<CXXRecordDecl>(GetDecl(VTableUses[Idx++]));
7229 // If we're simply supposed to record the declarations, do so now.
7419 const RecordData &Record, unsigned &Idx) {
7420 DeclarationName::NameKind Kind = (DeclarationName::NameKind)Record[Idx++];
7423 return DeclarationName(GetIdentifierInfo(F, Record, Idx));
7428 return DeclarationName(ReadSelector(F, Record, Idx));
7432 Context.getCanonicalType(readType(F, Record, Idx)));
7436 Context.getCanonicalType(readType(F, Record, Idx)));
7440 Context.getCanonicalType(readType(F, Record, Idx)));
7444 (OverloadedOperatorKind)Record[Idx++]);
7448 GetIdentifierInfo(F, Record, Idx));
7460 const RecordData &Record, unsigned &Idx) {
7465 DNLoc.NamedType.TInfo = GetTypeSourceInfo(F, Record, Idx);
7470 = ReadSourceLocation(F, Record, Idx).getRawEncoding();
7472 = ReadSourceLocation(F, Record, Idx).getRawEncoding();
7477 = ReadSourceLocation(F, Record, Idx).getRawEncoding();
7491 const RecordData &Record, unsigned &Idx) {
7492 NameInfo.setName(ReadDeclarationName(F, Record, Idx));
7493 NameInfo.setLoc(ReadSourceLocation(F, Record, Idx));
7495 ReadDeclarationNameLoc(F, DNLoc, NameInfo.getName(), Record, Idx);
7500 const RecordData &Record, unsigned &Idx) {
7501 Info.QualifierLoc = ReadNestedNameSpecifierLoc(F, Record, Idx);
7502 unsigned NumTPLists = Record[Idx++];
7507 Info.TemplParamLists[i] = ReadTemplateParameterList(F, Record, Idx);
7512 ASTReader::ReadTemplateName(ModuleFile &F, const RecordData &Record,
7514 TemplateName::NameKind Kind = (TemplateName::NameKind)Record[Idx++];
7517 return TemplateName(ReadDeclAs<TemplateDecl>(F, Record, Idx));
7520 unsigned size = Record[Idx++];
7523 Decls.addDecl(ReadDeclAs<NamedDecl>(F, Record, Idx));
7529 NestedNameSpecifier *NNS = ReadNestedNameSpecifier(F, Record, Idx);
7530 bool hasTemplKeyword = Record[Idx++];
7531 TemplateDecl *Template = ReadDeclAs<TemplateDecl>(F, Record, Idx);
7536 NestedNameSpecifier *NNS = ReadNestedNameSpecifier(F, Record, Idx);
7537 if (Record[Idx++]) // isIdentifier
7539 GetIdentifierInfo(F, Record,
7542 (OverloadedOperatorKind)Record[Idx++]);
7547 = ReadDeclAs<TemplateTemplateParmDecl>(F, Record, Idx);
7549 TemplateName replacement = ReadTemplateName(F, Record, Idx);
7555 = ReadDeclAs<TemplateTemplateParmDecl>(F, Record, Idx);
7559 TemplateArgument ArgPack = ReadTemplateArgument(F, Record, Idx);
7572 const RecordData &Record, unsigned &Idx) {
7573 TemplateArgument::ArgKind Kind = (TemplateArgument::ArgKind)Record[Idx++];
7578 return TemplateArgument(readType(F, Record, Idx));
7580 ValueDecl *D = ReadDeclAs<ValueDecl>(F, Record, Idx);
7581 bool ForReferenceParam = Record[Idx++];
7585 return TemplateArgument(readType(F, Record, Idx), /*isNullPtr*/true);
7587 llvm::APSInt Value = ReadAPSInt(Record, Idx);
7588 QualType T = readType(F, Record, Idx);
7592 return TemplateArgument(ReadTemplateName(F, Record, Idx));
7594 TemplateName Name = ReadTemplateName(F, Record, Idx);
7596 if (unsigned NumExpansions = Record[Idx++])
7603 unsigned NumArgs = Record[Idx++];
7606 Args[I] = ReadTemplateArgument(F, Record, Idx);
7616 const RecordData &Record, unsigned &Idx) {
7617 SourceLocation TemplateLoc = ReadSourceLocation(F, Record, Idx);
7618 SourceLocation LAngleLoc = ReadSourceLocation(F, Record, Idx);
7619 SourceLocation RAngleLoc = ReadSourceLocation(F, Record, Idx);
7621 unsigned NumParams = Record[Idx++];
7625 Params.push_back(ReadDeclAs<NamedDecl>(F, Record, Idx));
7636 ModuleFile &F, const RecordData &Record,
7638 unsigned NumTemplateArgs = Record[Idx++];
7641 TemplArgs.push_back(ReadTemplateArgument(F, Record, Idx));
7646 const RecordData &Record, unsigned &Idx) {
7647 unsigned NumDecls = Record[Idx++];
7650 DeclID ID = ReadDeclID(F, Record, Idx);
7651 AccessSpecifier AS = (AccessSpecifier)Record[Idx++];
7658 const RecordData &Record, unsigned &Idx) {
7659 bool isVirtual = static_cast<bool>(Record[Idx++]);
7660 bool isBaseOfClass = static_cast<bool>(Record[Idx++]);
7661 AccessSpecifier AS = static_cast<AccessSpecifier>(Record[Idx++]);
7662 bool inheritConstructors = static_cast<bool>(Record[Idx++]);
7663 TypeSourceInfo *TInfo = GetTypeSourceInfo(F, Record, Idx);
7664 SourceRange Range = ReadSourceRange(F, Record, Idx);
7665 SourceLocation EllipsisLoc = ReadSourceLocation(F, Record, Idx);
7673 ASTReader::ReadCXXCtorInitializers(ModuleFile &F, const RecordData &Record,
7676 unsigned NumInitializers = Record[Idx++];
7686 CtorInitializerType Type = (CtorInitializerType)Record[Idx++];
7689 TInfo = GetTypeSourceInfo(F, Record, Idx);
7690 IsBaseVirtual = Record[Idx++];
7694 TInfo = GetTypeSourceInfo(F, Record, Idx);
7698 Member = ReadDeclAs<FieldDecl>(F, Record, Idx);
7702 IndirectMember = ReadDeclAs<IndirectFieldDecl>(F, Record, Idx);
7706 SourceLocation MemberOrEllipsisLoc = ReadSourceLocation(F, Record, Idx);
7708 SourceLocation LParenLoc = ReadSourceLocation(F, Record, Idx);
7709 SourceLocation RParenLoc = ReadSourceLocation(F, Record, Idx);
7710 bool IsWritten = Record[Idx++];
7714 SourceOrderOrNumArrayIndices = Record[Idx++];
7716 SourceOrderOrNumArrayIndices = Record[Idx++];
7719 Indices.push_back(ReadDeclAs<VarDecl>(F, Record, Idx));
7762 const RecordData &Record, unsigned &Idx) {
7763 unsigned N = Record[Idx++];
7767 = (NestedNameSpecifier::SpecifierKind)Record[Idx++];
7770 Record, Idx);
7776 NamespaceDecl *NS = ReadDeclAs<NamespaceDecl>(F, Record, Idx);
7782 NamespaceAliasDecl *Alias =ReadDeclAs<NamespaceAliasDecl>(F, Record, Idx);
7789 const Type *T = readType(F, Record, Idx).getTypePtrOrNull();
7793 bool Template = Record[Idx++];
7810 ASTReader::ReadNestedNameSpecifierLoc(ModuleFile &F, const RecordData &Record,
7812 unsigned N = Record[Idx++];
7816 = (NestedNameSpecifier::SpecifierKind)Record[Idx++];
7819 IdentifierInfo *II = GetIdentifierInfo(F, Record, Idx);
7820 SourceRange Range = ReadSourceRange(F, Record, Idx);
7826 NamespaceDecl *NS = ReadDeclAs<NamespaceDecl>(F, Record, Idx);
7827 SourceRange Range = ReadSourceRange(F, Record, Idx);
7833 NamespaceAliasDecl *Alias =ReadDeclAs<NamespaceAliasDecl>(F, Record, Idx);
7834 SourceRange Range = ReadSourceRange(F, Record, Idx);
7841 bool Template = Record[Idx++];
7842 TypeSourceInfo *T = GetTypeSourceInfo(F, Record, Idx);
7845 SourceLocation ColonColonLoc = ReadSourceLocation(F, Record, Idx);
7855 SourceLocation ColonColonLoc = ReadSourceLocation(F, Record, Idx);
7866 ASTReader::ReadSourceRange(ModuleFile &F, const RecordData &Record,
7868 SourceLocation beg = ReadSourceLocation(F, Record, Idx);
7869 SourceLocation end = ReadSourceLocation(F, Record, Idx);
7874 llvm::APInt ASTReader::ReadAPInt(const RecordData &Record, unsigned &Idx) {
7875 unsigned BitWidth = Record[Idx++];
7877 llvm::APInt Result(BitWidth, NumWords, &Record[Idx]);
7883 llvm::APSInt ASTReader::ReadAPSInt(const RecordData &Record, unsigned &Idx) {
7884 bool isUnsigned = Record[Idx++];
7885 return llvm::APSInt(ReadAPInt(Record, Idx), isUnsigned);
7889 llvm::APFloat ASTReader::ReadAPFloat(const RecordData &Record,
7892 return llvm::APFloat(Sem, ReadAPInt(Record, Idx));
7896 std::string ASTReader::ReadString(const RecordData &Record, unsigned &Idx) {
7897 unsigned Len = Record[Idx++];
7898 std::string Result(Record.data() + Idx, Record.data() + Idx + Len);
7903 VersionTuple ASTReader::ReadVersionTuple(const RecordData &Record,
7905 unsigned Major = Record[Idx++];
7906 unsigned Minor = Record[Idx++];
7907 unsigned Subminor = Record[Idx++];
7916 const RecordData &Record,
7918 CXXDestructorDecl *Decl = ReadDeclAs<CXXDestructorDecl>(F, Record, Idx);
7936 /// \brief Record that the given ID maps to the given switch-case
7966 RecordData Record;
7974 Error("malformed block record in AST file");
7978 case llvm::BitstreamEntry::Record:
7983 // Read a record.
7984 Record.clear();
7985 switch ((CommentRecordTypes)Cursor.readRecord(Entry.ID, Record)) {
7988 SourceRange SR = ReadSourceRange(F, Record, Idx);
7990 (RawComment::CommentKind) Record[Idx++];
7991 bool IsTrailingComment = Record[Idx++];
7992 bool IsAlmostTrailingComment = Record[Idx++];