Index: cfe/trunk/include/clang/Serialization/ASTReader.h =================================================================== --- cfe/trunk/include/clang/Serialization/ASTReader.h +++ cfe/trunk/include/clang/Serialization/ASTReader.h @@ -2250,13 +2250,13 @@ } /// \brief Read the record that describes the lexical contents of a DC. - bool ReadLexicalDeclContextStorage(uint64_t Offset, DeclContext *DC) { + bool readLexicalDeclContextStorage(uint64_t Offset, DeclContext *DC) { return Reader->ReadLexicalDeclContextStorage(*F, F->DeclsCursor, Offset, DC); } /// \brief Read the record that describes the visible contents of a DC. - bool ReadVisibleDeclContextStorage(uint64_t Offset, + bool readVisibleDeclContextStorage(uint64_t Offset, serialization::DeclID ID) { return Reader->ReadVisibleDeclContextStorage(*F, F->DeclsCursor, Offset, ID); @@ -2273,37 +2273,37 @@ } /// \brief Reads a statement. - Stmt *ReadStmt() { return Reader->ReadStmt(*F); } + Stmt *readStmt() { return Reader->ReadStmt(*F); } /// \brief Reads an expression. - Expr *ReadExpr() { return Reader->ReadExpr(*F); } + Expr *readExpr() { return Reader->ReadExpr(*F); } /// \brief Reads a sub-statement operand during statement reading. - Stmt *ReadSubStmt() { return Reader->ReadSubStmt(); } + Stmt *readSubStmt() { return Reader->ReadSubStmt(); } /// \brief Reads a sub-expression operand during statement reading. - Expr *ReadSubExpr() { return Reader->ReadSubExpr(); } + Expr *readSubExpr() { return Reader->ReadSubExpr(); } /// \brief Reads a TemplateArgumentLocInfo appropriate for the /// given TemplateArgument kind, advancing Idx. TemplateArgumentLocInfo - GetTemplateArgumentLocInfo(TemplateArgument::ArgKind Kind) { + getTemplateArgumentLocInfo(TemplateArgument::ArgKind Kind) { return Reader->GetTemplateArgumentLocInfo(*F, Kind, Record, Idx); } /// \brief Reads a TemplateArgumentLoc, advancing Idx. TemplateArgumentLoc - ReadTemplateArgumentLoc() { + readTemplateArgumentLoc() { return Reader->ReadTemplateArgumentLoc(*F, Record, Idx); } const ASTTemplateArgumentListInfo* - ReadASTTemplateArgumentListInfo() { + readASTTemplateArgumentListInfo() { return Reader->ReadASTTemplateArgumentListInfo(*F, Record, Idx); } /// \brief Reads a declarator info from the given record, advancing Idx. - TypeSourceInfo *GetTypeSourceInfo() { + TypeSourceInfo *getTypeSourceInfo() { return Reader->GetTypeSourceInfo(*F, Record, Idx); } @@ -2320,13 +2320,13 @@ /// \brief Reads a declaration ID from the given position in this record. /// /// \returns The declaration ID read from the record, adjusted to a global ID. - serialization::DeclID ReadDeclID() { + serialization::DeclID readDeclID() { return Reader->ReadDeclID(*F, Record, Idx); } /// \brief Reads a declaration from the given position in a record in the /// given module, advancing Idx. - Decl *ReadDecl() { + Decl *readDecl() { return Reader->ReadDecl(*F, Record, Idx); } @@ -2336,134 +2336,134 @@ /// \returns The declaration read from this location, casted to the given /// result type. template - T *ReadDeclAs() { + T *readDeclAs() { return Reader->ReadDeclAs(*F, Record, Idx); } - IdentifierInfo *GetIdentifierInfo() { + IdentifierInfo *getIdentifierInfo() { return Reader->GetIdentifierInfo(*F, Record, Idx); } /// \brief Read a selector from the Record, advancing Idx. - Selector ReadSelector() { + Selector readSelector() { return Reader->ReadSelector(*F, Record, Idx); } /// \brief Read a declaration name, advancing Idx. - DeclarationName ReadDeclarationName() { + DeclarationName readDeclarationName() { return Reader->ReadDeclarationName(*F, Record, Idx); } - void ReadDeclarationNameLoc(DeclarationNameLoc &DNLoc, DeclarationName Name) { + void readDeclarationNameLoc(DeclarationNameLoc &DNLoc, DeclarationName Name) { return Reader->ReadDeclarationNameLoc(*F, DNLoc, Name, Record, Idx); } - void ReadDeclarationNameInfo(DeclarationNameInfo &NameInfo) { + void readDeclarationNameInfo(DeclarationNameInfo &NameInfo) { return Reader->ReadDeclarationNameInfo(*F, NameInfo, Record, Idx); } - void ReadQualifierInfo(QualifierInfo &Info) { + void readQualifierInfo(QualifierInfo &Info) { return Reader->ReadQualifierInfo(*F, Info, Record, Idx); } - NestedNameSpecifier *ReadNestedNameSpecifier() { + NestedNameSpecifier *readNestedNameSpecifier() { return Reader->ReadNestedNameSpecifier(*F, Record, Idx); } - NestedNameSpecifierLoc ReadNestedNameSpecifierLoc() { + NestedNameSpecifierLoc readNestedNameSpecifierLoc() { return Reader->ReadNestedNameSpecifierLoc(*F, Record, Idx); } /// \brief Read a template name, advancing Idx. - TemplateName ReadTemplateName() { + TemplateName readTemplateName() { return Reader->ReadTemplateName(*F, Record, Idx); } /// \brief Read a template argument, advancing Idx. - TemplateArgument ReadTemplateArgument(bool Canonicalize = false) { + TemplateArgument readTemplateArgument(bool Canonicalize = false) { return Reader->ReadTemplateArgument(*F, Record, Idx, Canonicalize); } /// \brief Read a template parameter list, advancing Idx. - TemplateParameterList *ReadTemplateParameterList() { + TemplateParameterList *readTemplateParameterList() { return Reader->ReadTemplateParameterList(*F, Record, Idx); } /// \brief Read a template argument array, advancing Idx. - void ReadTemplateArgumentList(SmallVectorImpl &TemplArgs, + void readTemplateArgumentList(SmallVectorImpl &TemplArgs, bool Canonicalize = false) { return Reader->ReadTemplateArgumentList(TemplArgs, *F, Record, Idx, Canonicalize); } /// \brief Read a UnresolvedSet structure, advancing Idx. - void ReadUnresolvedSet(LazyASTUnresolvedSet &Set) { + void readUnresolvedSet(LazyASTUnresolvedSet &Set) { return Reader->ReadUnresolvedSet(*F, Set, Record, Idx); } /// \brief Read a C++ base specifier, advancing Idx. - CXXBaseSpecifier ReadCXXBaseSpecifier() { + CXXBaseSpecifier readCXXBaseSpecifier() { return Reader->ReadCXXBaseSpecifier(*F, Record, Idx); } /// \brief Read a CXXCtorInitializer array, advancing Idx. - CXXCtorInitializer **ReadCXXCtorInitializers() { + CXXCtorInitializer **readCXXCtorInitializers() { return Reader->ReadCXXCtorInitializers(*F, Record, Idx); } - CXXTemporary *ReadCXXTemporary() { + CXXTemporary *readCXXTemporary() { return Reader->ReadCXXTemporary(*F, Record, Idx); } /// \brief Read a source location, advancing Idx. - SourceLocation ReadSourceLocation() { + SourceLocation readSourceLocation() { return Reader->ReadSourceLocation(*F, Record, Idx); } /// \brief Read a source range, advancing Idx. - SourceRange ReadSourceRange() { + SourceRange readSourceRange() { return Reader->ReadSourceRange(*F, Record, Idx); } /// \brief Read an integral value, advancing Idx. - llvm::APInt ReadAPInt() { + llvm::APInt readAPInt() { return Reader->ReadAPInt(Record, Idx); } /// \brief Read a signed integral value, advancing Idx. - llvm::APSInt ReadAPSInt() { + llvm::APSInt readAPSInt() { return Reader->ReadAPSInt(Record, Idx); } /// \brief Read a floating-point value, advancing Idx. - llvm::APFloat ReadAPFloat(const llvm::fltSemantics &Sem) { + llvm::APFloat readAPFloat(const llvm::fltSemantics &Sem) { return Reader->ReadAPFloat(Record, Sem,Idx); } /// \brief Read a string, advancing Idx. - std::string ReadString() { + std::string readString() { return Reader->ReadString(Record, Idx); } /// \brief Read a path, advancing Idx. - std::string ReadPath() { + std::string readPath() { return Reader->ReadPath(*F, Record, Idx); } /// \brief Read a version tuple, advancing Idx. - VersionTuple ReadVersionTuple() { + VersionTuple readVersionTuple() { return ASTReader::ReadVersionTuple(Record, Idx); } /// \brief Reads attributes from the current stream position, advancing Idx. - void ReadAttributes(AttrVec &Attrs) { + void readAttributes(AttrVec &Attrs) { return Reader->ReadAttributes(*F, Attrs, Record, Idx); } /// \brief Reads a token out of a record, advancing Idx. - Token ReadToken() { + Token readToken() { return Reader->ReadToken(*F, Record, Idx); } - void RecordSwitchCaseID(SwitchCase *SC, unsigned ID) { + void recordSwitchCaseID(SwitchCase *SC, unsigned ID) { Reader->RecordSwitchCaseID(SC, ID); } Index: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp =================================================================== --- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp +++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp @@ -66,23 +66,23 @@ } SourceLocation ReadSourceLocation() { - return Record.ReadSourceLocation(); + return Record.readSourceLocation(); } SourceRange ReadSourceRange() { - return Record.ReadSourceRange(); + return Record.readSourceRange(); } TypeSourceInfo *GetTypeSourceInfo() { - return Record.GetTypeSourceInfo(); + return Record.getTypeSourceInfo(); } serialization::DeclID ReadDeclID() { - return Record.ReadDeclID(); + return Record.readDeclID(); } std::string ReadString() { - return Record.ReadString(); + return Record.readString(); } void ReadDeclIDList(SmallVectorImpl &IDs) { @@ -91,20 +91,20 @@ } Decl *ReadDecl() { - return Record.ReadDecl(); + return Record.readDecl(); } template T *ReadDeclAs() { - return Record.ReadDeclAs(); + return Record.readDeclAs(); } void ReadQualifierInfo(QualifierInfo &Info) { - Record.ReadQualifierInfo(Info); + Record.readQualifierInfo(Info); } void ReadDeclarationNameLoc(DeclarationNameLoc &DNLoc, DeclarationName Name) { - Record.ReadDeclarationNameLoc(DNLoc, Name); + Record.readDeclarationNameLoc(DNLoc, Name); } serialization::SubmoduleID readSubmoduleID() { @@ -501,7 +501,7 @@ D->setInvalidDecl(Record.readInt()); if (Record.readInt()) { // hasAttrs AttrVec Attrs; - Record.ReadAttributes(Attrs); + Record.readAttributes(Attrs); // Avoid calling setAttrs() directly because it uses Decl::getASTContext() // internally which is unsafe during derialization. D->setAttrsImpl(Attrs, Reader.getContext()); @@ -571,7 +571,7 @@ void ASTDeclReader::VisitNamedDecl(NamedDecl *ND) { VisitDecl(ND); - ND->setDeclName(Record.ReadDeclarationName()); + ND->setDeclName(Record.readDeclarationName()); AnonymousDeclNumber = Record.readInt(); } @@ -633,7 +633,7 @@ } case 2: // TypedefNameForAnonDecl NamedDeclForTagDecl = ReadDeclID(); - TypedefNameForLinkage = Record.GetIdentifierInfo(); + TypedefNameForLinkage = Record.getIdentifierInfo(); break; default: llvm_unreachable("unexpected tag info kind"); @@ -709,8 +709,8 @@ void ASTDeclReader::VisitEnumConstantDecl(EnumConstantDecl *ECD) { VisitValueDecl(ECD); if (Record.readInt()) - ECD->setInitExpr(Record.ReadExpr()); - ECD->setInitVal(Record.ReadAPSInt()); + ECD->setInitExpr(Record.readExpr()); + ECD->setInitVal(Record.readAPSInt()); mergeMergeable(ECD); } @@ -778,7 +778,7 @@ // Template arguments. SmallVector TemplArgs; - Record.ReadTemplateArgumentList(TemplArgs, /*Canonicalize*/ true); + Record.readTemplateArgumentList(TemplArgs, /*Canonicalize*/ true); // Template args as written. SmallVector TemplArgLocs; @@ -788,7 +788,7 @@ unsigned NumTemplateArgLocs = Record.readInt(); TemplArgLocs.reserve(NumTemplateArgLocs); for (unsigned i=0; i != NumTemplateArgLocs; ++i) - TemplArgLocs.push_back(Record.ReadTemplateArgumentLoc()); + TemplArgLocs.push_back(Record.readTemplateArgumentLoc()); LAngleLoc = ReadSourceLocation(); RAngleLoc = ReadSourceLocation(); @@ -846,7 +846,7 @@ TemplateArgumentListInfo TemplArgs; unsigned NumArgs = Record.readInt(); while (NumArgs--) - TemplArgs.addArgument(Record.ReadTemplateArgumentLoc()); + TemplArgs.addArgument(Record.readTemplateArgumentLoc()); TemplArgs.setLAngleLoc(ReadSourceLocation()); TemplArgs.setRAngleLoc(ReadSourceLocation()); @@ -1111,8 +1111,8 @@ (ObjCPropertyDecl::PropertyAttributeKind)Record.readInt()); D->setPropertyImplementation( (ObjCPropertyDecl::PropertyControl)Record.readInt()); - D->setGetterName(Record.ReadDeclarationName().getObjCSelector()); - D->setSetterName(Record.ReadDeclarationName().getObjCSelector()); + D->setGetterName(Record.readDeclarationName().getObjCSelector()); + D->setSetterName(Record.readDeclarationName().getObjCSelector()); D->setGetterMethodDecl(ReadDeclAs()); D->setSetterMethodDecl(ReadDeclAs()); D->setPropertyIvarDecl(ReadDeclAs()); @@ -1125,7 +1125,7 @@ void ASTDeclReader::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) { VisitObjCImplDecl(D); - D->setIdentifier(Record.GetIdentifierInfo()); + D->setIdentifier(Record.getIdentifierInfo()); D->CategoryNameLoc = ReadSourceLocation(); } @@ -1148,8 +1148,8 @@ D->setPropertyDecl(ReadDeclAs()); D->PropertyIvarDecl = ReadDeclAs(); D->IvarLoc = ReadSourceLocation(); - D->setGetterCXXConstructor(Record.ReadExpr()); - D->setSetterCXXAssignment(Record.ReadExpr()); + D->setGetterCXXConstructor(Record.readExpr()); + D->setSetterCXXAssignment(Record.readExpr()); } void ASTDeclReader::VisitFieldDecl(FieldDecl *FD) { @@ -1162,7 +1162,7 @@ // Read captured variable length array. FD->InitStorage.setPointer(Record.readType().getAsOpaquePtr()); } else { - FD->InitStorage.setPointer(Record.ReadExpr()); + FD->InitStorage.setPointer(Record.readExpr()); } } if (!FD->getDeclName()) { @@ -1174,8 +1174,8 @@ void ASTDeclReader::VisitMSPropertyDecl(MSPropertyDecl *PD) { VisitDeclaratorDecl(PD); - PD->GetterId = Record.GetIdentifierInfo(); - PD->SetterId = Record.GetIdentifierInfo(); + PD->GetterId = Record.getIdentifierInfo(); + PD->SetterId = Record.getIdentifierInfo(); } void ASTDeclReader::VisitIndirectFieldDecl(IndirectFieldDecl *FD) { @@ -1220,7 +1220,7 @@ VD->setLocalExternDecl(); if (uint64_t Val = Record.readInt()) { - VD->setInit(Record.ReadExpr()); + VD->setInit(Record.readExpr()); if (Val > 1) { // IsInitKnownICE = 1, IsInitNotICE = 2, IsInitICE = 3 EvaluatedStmt *Eval = VD->ensureEvaluatedStmt(); Eval->CheckedICE = true; @@ -1277,7 +1277,7 @@ PD->ParmVarDeclBits.IsKNRPromoted = Record.readInt(); PD->ParmVarDeclBits.HasInheritedDefaultArg = Record.readInt(); if (Record.readInt()) // hasUninstantiatedDefaultArg. - PD->setUninstantiatedDefaultArg(Record.ReadExpr()); + PD->setUninstantiatedDefaultArg(Record.readExpr()); // FIXME: If this is a redeclaration of a function from another module, handle // inheritance of default arguments. @@ -1292,18 +1292,18 @@ void ASTDeclReader::VisitBindingDecl(BindingDecl *BD) { VisitValueDecl(BD); - BD->Binding = Record.ReadExpr(); + BD->Binding = Record.readExpr(); } void ASTDeclReader::VisitFileScopeAsmDecl(FileScopeAsmDecl *AD) { VisitDecl(AD); - AD->setAsmString(cast(Record.ReadExpr())); + AD->setAsmString(cast(Record.readExpr())); AD->setRParenLoc(ReadSourceLocation()); } void ASTDeclReader::VisitBlockDecl(BlockDecl *BD) { VisitDecl(BD); - BD->setBody(cast_or_null(Record.ReadStmt())); + BD->setBody(cast_or_null(Record.readStmt())); BD->setSignatureAsWritten(GetTypeSourceInfo()); unsigned NumParams = Record.readInt(); SmallVector Params; @@ -1325,7 +1325,7 @@ unsigned flags = Record.readInt(); bool byRef = (flags & 1); bool nested = (flags & 2); - Expr *copyExpr = ((flags & 4) ? Record.ReadExpr() : nullptr); + Expr *copyExpr = ((flags & 4) ? Record.readExpr() : nullptr); captures.push_back(BlockDecl::Capture(decl, byRef, nested, copyExpr)); } @@ -1399,7 +1399,7 @@ VisitNamedDecl(D); D->NamespaceLoc = ReadSourceLocation(); D->IdentLoc = ReadSourceLocation(); - D->QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + D->QualifierLoc = Record.readNestedNameSpecifierLoc(); D->Namespace = ReadDeclAs(); mergeRedeclarable(D, Redecl); } @@ -1407,7 +1407,7 @@ void ASTDeclReader::VisitUsingDecl(UsingDecl *D) { VisitNamedDecl(D); D->setUsingLoc(ReadSourceLocation()); - D->QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + D->QualifierLoc = Record.readNestedNameSpecifierLoc(); ReadDeclarationNameLoc(D->DNLoc, D->getDeclName()); D->FirstUsingShadow.setPointer(ReadDeclAs()); D->setTypename(Record.readInt()); @@ -1448,7 +1448,7 @@ VisitNamedDecl(D); D->UsingLoc = ReadSourceLocation(); D->NamespaceLoc = ReadSourceLocation(); - D->QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + D->QualifierLoc = Record.readNestedNameSpecifierLoc(); D->NominatedNamespace = ReadDeclAs(); D->CommonAncestor = ReadDeclAs(); } @@ -1456,7 +1456,7 @@ void ASTDeclReader::VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D) { VisitValueDecl(D); D->setUsingLoc(ReadSourceLocation()); - D->QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + D->QualifierLoc = Record.readNestedNameSpecifierLoc(); ReadDeclarationNameLoc(D->DNLoc, D->getDeclName()); D->EllipsisLoc = ReadSourceLocation(); mergeMergeable(D); @@ -1466,7 +1466,7 @@ UnresolvedUsingTypenameDecl *D) { VisitTypeDecl(D); D->TypenameLocation = ReadSourceLocation(); - D->QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + D->QualifierLoc = Record.readNestedNameSpecifierLoc(); D->EllipsisLoc = ReadSourceLocation(); mergeMergeable(D); } @@ -1523,8 +1523,8 @@ if (Data.NumVBases) Data.VBases = ReadGlobalOffset(); - Record.ReadUnresolvedSet(Data.Conversions); - Record.ReadUnresolvedSet(Data.VisibleConversions); + Record.readUnresolvedSet(Data.Conversions); + Record.readUnresolvedSet(Data.VisibleConversions); assert(Data.Definition && "Data.Definition should be already set!"); Data.FirstFriend = ReadDeclID(); @@ -1846,7 +1846,7 @@ D->Friend = GetTypeSourceInfo(); for (unsigned i = 0; i != D->NumTPLists; ++i) D->getTrailingObjects()[i] = - Record.ReadTemplateParameterList(); + Record.readTemplateParameterList(); D->NextFriend = ReadDeclID(); D->UnsupportedFriend = (Record.readInt() != 0); D->FriendLoc = ReadSourceLocation(); @@ -1858,7 +1858,7 @@ D->NumParams = NumParams; D->Params = new TemplateParameterList*[NumParams]; for (unsigned i = 0; i != NumParams; ++i) - D->Params[i] = Record.ReadTemplateParameterList(); + D->Params[i] = Record.readTemplateParameterList(); if (Record.readInt()) // HasFriendDecl D->Friend = ReadDeclAs(); else @@ -1871,7 +1871,7 @@ DeclID PatternID = ReadDeclID(); NamedDecl *TemplatedDecl = cast_or_null(Reader.GetDecl(PatternID)); - TemplateParameterList *TemplateParams = Record.ReadTemplateParameterList(); + TemplateParameterList *TemplateParams = Record.readTemplateParameterList(); D->init(TemplatedDecl, TemplateParams); return PatternID; @@ -1991,7 +1991,7 @@ D->SpecializedTemplate = CTD; } else { SmallVector TemplArgs; - Record.ReadTemplateArgumentList(TemplArgs); + Record.readTemplateArgumentList(TemplArgs); TemplateArgumentList *ArgList = TemplateArgumentList::CreateCopy(C, TemplArgs); ClassTemplateSpecializationDecl::SpecializedPartialSpecialization *PS @@ -2005,7 +2005,7 @@ } SmallVector TemplArgs; - Record.ReadTemplateArgumentList(TemplArgs, /*Canonicalize*/ true); + Record.readTemplateArgumentList(TemplArgs, /*Canonicalize*/ true); D->TemplateArgs = TemplateArgumentList::CreateCopy(C, TemplArgs); D->PointOfInstantiation = ReadSourceLocation(); D->SpecializationKind = (TemplateSpecializationKind)Record.readInt(); @@ -2058,8 +2058,8 @@ ClassTemplatePartialSpecializationDecl *D) { RedeclarableResult Redecl = VisitClassTemplateSpecializationDeclImpl(D); - D->TemplateParams = Record.ReadTemplateParameterList(); - D->ArgsAsWritten = Record.ReadASTTemplateArgumentListInfo(); + D->TemplateParams = Record.readTemplateParameterList(); + D->ArgsAsWritten = Record.readASTTemplateArgumentListInfo(); // These are read/set from/to the first declaration. if (ThisDeclID == Redecl.getFirstID()) { @@ -2107,7 +2107,7 @@ D->SpecializedTemplate = VTD; } else { SmallVector TemplArgs; - Record.ReadTemplateArgumentList(TemplArgs); + Record.readTemplateArgumentList(TemplArgs); TemplateArgumentList *ArgList = TemplateArgumentList::CreateCopy( C, TemplArgs); VarTemplateSpecializationDecl::SpecializedPartialSpecialization *PS = @@ -2131,7 +2131,7 @@ } SmallVector TemplArgs; - Record.ReadTemplateArgumentList(TemplArgs, /*Canonicalize*/ true); + Record.readTemplateArgumentList(TemplArgs, /*Canonicalize*/ true); D->TemplateArgs = TemplateArgumentList::CreateCopy(C, TemplArgs); D->PointOfInstantiation = ReadSourceLocation(); D->SpecializationKind = (TemplateSpecializationKind)Record.readInt(); @@ -2163,8 +2163,8 @@ VarTemplatePartialSpecializationDecl *D) { RedeclarableResult Redecl = VisitVarTemplateSpecializationDeclImpl(D); - D->TemplateParams = Record.ReadTemplateParameterList(); - D->ArgsAsWritten = Record.ReadASTTemplateArgumentListInfo(); + D->TemplateParams = Record.readTemplateParameterList(); + D->ArgsAsWritten = Record.readASTTemplateArgumentListInfo(); // These are read/set from/to the first declaration. if (ThisDeclID == Redecl.getFirstID()) { @@ -2199,7 +2199,7 @@ // Rest of NonTypeTemplateParmDecl. D->ParameterPack = Record.readInt(); if (Record.readInt()) - D->setDefaultArgument(Record.ReadExpr()); + D->setDefaultArgument(Record.readExpr()); } } @@ -2213,13 +2213,13 @@ D->getTrailingObjects(); for (unsigned I = 0, N = D->getNumExpansionTemplateParameters(); I != N; ++I) - Data[I] = Record.ReadTemplateParameterList(); + Data[I] = Record.readTemplateParameterList(); } else { // Rest of TemplateTemplateParmDecl. D->ParameterPack = Record.readInt(); if (Record.readInt()) D->setDefaultArgument(Reader.getContext(), - Record.ReadTemplateArgumentLoc()); + Record.readTemplateArgumentLoc()); } } @@ -2229,9 +2229,9 @@ void ASTDeclReader::VisitStaticAssertDecl(StaticAssertDecl *D) { VisitDecl(D); - D->AssertExprAndFailed.setPointer(Record.ReadExpr()); + D->AssertExprAndFailed.setPointer(Record.readExpr()); D->AssertExprAndFailed.setInt(Record.readInt()); - D->Message = cast_or_null(Record.ReadExpr()); + D->Message = cast_or_null(Record.readExpr()); D->RParenLoc = ReadSourceLocation(); } @@ -2448,7 +2448,7 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) { - Vars.push_back(Record.ReadExpr()); + Vars.push_back(Record.readExpr()); } D->setVars(Vars); } @@ -2456,8 +2456,8 @@ void ASTDeclReader::VisitOMPDeclareReductionDecl(OMPDeclareReductionDecl *D) { VisitValueDecl(D); D->setLocation(ReadSourceLocation()); - D->setCombiner(Record.ReadExpr()); - D->setInitializer(Record.ReadExpr()); + D->setCombiner(Record.readExpr()); + D->setInitializer(Record.readExpr()); D->PrevDeclInScope = ReadDeclID(); } @@ -3775,7 +3775,7 @@ auto *RD = cast(D); // FIXME: If we also have an update record for instantiating the // definition of D, we need that to happen before we get here. - Decl *MD = Record.ReadDecl(); + Decl *MD = Record.readDecl(); assert(MD && "couldn't read decl from update record"); // FIXME: We should call addHiddenDecl instead, to add the member // to its DeclContext. @@ -3785,7 +3785,7 @@ case UPD_CXX_ADDED_TEMPLATE_SPECIALIZATION: // It will be added to the template's specializations set when loaded. - (void)Record.ReadDecl(); + (void)Record.readDecl(); break; case UPD_CXX_ADDED_ANONYMOUS_NAMESPACE: { @@ -3814,7 +3814,7 @@ // We have to read the default argument regardless of whether we use it // so that hypothetical further update records aren't messed up. // TODO: Add a function to skip over the next expr record. - auto DefaultArg = Record.ReadExpr(); + auto DefaultArg = Record.readExpr(); // Only apply the update if the parameter still has an uninstantiated // default argument. @@ -3825,7 +3825,7 @@ case UPD_CXX_INSTANTIATED_DEFAULT_MEMBER_INITIALIZER: { auto FD = cast(D); - auto DefaultInit = Record.ReadExpr(); + auto DefaultInit = Record.readExpr(); // Only apply the update if the field still has an uninstantiated // default member initializer. @@ -3880,7 +3880,7 @@ // Visible update is handled separately. uint64_t LexicalOffset = ReadLocalOffset(); if (!HadRealDefinition && LexicalOffset) { - Record.ReadLexicalDeclContextStorage(LexicalOffset, RD); + Record.readLexicalDeclContextStorage(LexicalOffset, RD); Reader.PendingFakeDefinitionData.erase(OldDD); } @@ -3900,7 +3900,7 @@ auto PartialSpec = ReadDeclAs(); SmallVector TemplArgs; - Record.ReadTemplateArgumentList(TemplArgs); + Record.readTemplateArgumentList(TemplArgs); auto *TemplArgList = TemplateArgumentList::CreateCopy( Reader.getContext(), TemplArgs); @@ -3919,7 +3919,7 @@ if (Record.readInt()) { AttrVec Attrs; - Record.ReadAttributes(Attrs); + Record.readAttributes(Attrs); // If the declaration already has attributes, we assume that some other // AST file already loaded them. if (!D->hasAttrs()) @@ -4017,7 +4017,7 @@ case UPD_DECL_MARKED_OPENMP_DECLARETARGET: case UPD_ADDED_ATTR_TO_RECORD: AttrVec Attrs; - Record.ReadAttributes(Attrs); + Record.readAttributes(Attrs); assert(Attrs.size() == 1); D->addAttr(Attrs[0]); break; Index: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp =================================================================== --- cfe/trunk/lib/Serialization/ASTReaderStmt.cpp +++ cfe/trunk/lib/Serialization/ASTReaderStmt.cpp @@ -31,37 +31,37 @@ llvm::BitstreamCursor &DeclsCursor; SourceLocation ReadSourceLocation() { - return Record.ReadSourceLocation(); + return Record.readSourceLocation(); } SourceRange ReadSourceRange() { - return Record.ReadSourceRange(); + return Record.readSourceRange(); } std::string ReadString() { - return Record.ReadString(); + return Record.readString(); } TypeSourceInfo *GetTypeSourceInfo() { - return Record.GetTypeSourceInfo(); + return Record.getTypeSourceInfo(); } Decl *ReadDecl() { - return Record.ReadDecl(); + return Record.readDecl(); } template T *ReadDeclAs() { - return Record.ReadDeclAs(); + return Record.readDeclAs(); } void ReadDeclarationNameLoc(DeclarationNameLoc &DNLoc, DeclarationName Name) { - Record.ReadDeclarationNameLoc(DNLoc, Name); + Record.readDeclarationNameLoc(DNLoc, Name); } void ReadDeclarationNameInfo(DeclarationNameInfo &NameInfo) { - Record.ReadDeclarationNameInfo(NameInfo); + Record.readDeclarationNameInfo(NameInfo); } public: @@ -99,7 +99,7 @@ ArgInfo.setLAngleLoc(ReadSourceLocation()); ArgInfo.setRAngleLoc(ReadSourceLocation()); for (unsigned i = 0; i != NumTemplateArgs; ++i) - ArgInfo.addArgument(Record.ReadTemplateArgumentLoc()); + ArgInfo.addArgument(Record.readTemplateArgumentLoc()); Args.initializeFrom(TemplateKWLoc, ArgInfo, ArgsLocArray); } @@ -118,7 +118,7 @@ SmallVector Stmts; unsigned NumStmts = Record.readInt(); while (NumStmts--) - Stmts.push_back(Record.ReadSubStmt()); + Stmts.push_back(Record.readSubStmt()); S->setStmts(Record.getContext(), Stmts); S->LBraceLoc = ReadSourceLocation(); S->RBraceLoc = ReadSourceLocation(); @@ -126,22 +126,22 @@ void ASTStmtReader::VisitSwitchCase(SwitchCase *S) { VisitStmt(S); - Record.RecordSwitchCaseID(S, Record.readInt()); + Record.recordSwitchCaseID(S, Record.readInt()); S->setKeywordLoc(ReadSourceLocation()); S->setColonLoc(ReadSourceLocation()); } void ASTStmtReader::VisitCaseStmt(CaseStmt *S) { VisitSwitchCase(S); - S->setLHS(Record.ReadSubExpr()); - S->setRHS(Record.ReadSubExpr()); - S->setSubStmt(Record.ReadSubStmt()); + S->setLHS(Record.readSubExpr()); + S->setRHS(Record.readSubExpr()); + S->setSubStmt(Record.readSubStmt()); S->setEllipsisLoc(ReadSourceLocation()); } void ASTStmtReader::VisitDefaultStmt(DefaultStmt *S) { VisitSwitchCase(S); - S->setSubStmt(Record.ReadSubStmt()); + S->setSubStmt(Record.readSubStmt()); } void ASTStmtReader::VisitLabelStmt(LabelStmt *S) { @@ -149,7 +149,7 @@ LabelDecl *LD = ReadDeclAs(); LD->setStmt(S); S->setDecl(LD); - S->setSubStmt(Record.ReadSubStmt()); + S->setSubStmt(Record.readSubStmt()); S->setIdentLoc(ReadSourceLocation()); } @@ -157,33 +157,33 @@ VisitStmt(S); uint64_t NumAttrs = Record.readInt(); AttrVec Attrs; - Record.ReadAttributes(Attrs); + Record.readAttributes(Attrs); (void)NumAttrs; assert(NumAttrs == S->NumAttrs); assert(NumAttrs == Attrs.size()); std::copy(Attrs.begin(), Attrs.end(), S->getAttrArrayPtr()); - S->SubStmt = Record.ReadSubStmt(); + S->SubStmt = Record.readSubStmt(); S->AttrLoc = ReadSourceLocation(); } void ASTStmtReader::VisitIfStmt(IfStmt *S) { VisitStmt(S); S->setConstexpr(Record.readInt()); - S->setInit(Record.ReadSubStmt()); + S->setInit(Record.readSubStmt()); S->setConditionVariable(Record.getContext(), ReadDeclAs()); - S->setCond(Record.ReadSubExpr()); - S->setThen(Record.ReadSubStmt()); - S->setElse(Record.ReadSubStmt()); + S->setCond(Record.readSubExpr()); + S->setThen(Record.readSubStmt()); + S->setElse(Record.readSubStmt()); S->setIfLoc(ReadSourceLocation()); S->setElseLoc(ReadSourceLocation()); } void ASTStmtReader::VisitSwitchStmt(SwitchStmt *S) { VisitStmt(S); - S->setInit(Record.ReadSubStmt()); + S->setInit(Record.readSubStmt()); S->setConditionVariable(Record.getContext(), ReadDeclAs()); - S->setCond(Record.ReadSubExpr()); - S->setBody(Record.ReadSubStmt()); + S->setCond(Record.readSubExpr()); + S->setBody(Record.readSubStmt()); S->setSwitchLoc(ReadSourceLocation()); if (Record.readInt()) S->setAllEnumCasesCovered(); @@ -204,15 +204,15 @@ VisitStmt(S); S->setConditionVariable(Record.getContext(), ReadDeclAs()); - S->setCond(Record.ReadSubExpr()); - S->setBody(Record.ReadSubStmt()); + S->setCond(Record.readSubExpr()); + S->setBody(Record.readSubStmt()); S->setWhileLoc(ReadSourceLocation()); } void ASTStmtReader::VisitDoStmt(DoStmt *S) { VisitStmt(S); - S->setCond(Record.ReadSubExpr()); - S->setBody(Record.ReadSubStmt()); + S->setCond(Record.readSubExpr()); + S->setBody(Record.readSubStmt()); S->setDoLoc(ReadSourceLocation()); S->setWhileLoc(ReadSourceLocation()); S->setRParenLoc(ReadSourceLocation()); @@ -220,11 +220,11 @@ void ASTStmtReader::VisitForStmt(ForStmt *S) { VisitStmt(S); - S->setInit(Record.ReadSubStmt()); - S->setCond(Record.ReadSubExpr()); + S->setInit(Record.readSubStmt()); + S->setCond(Record.readSubExpr()); S->setConditionVariable(Record.getContext(), ReadDeclAs()); - S->setInc(Record.ReadSubExpr()); - S->setBody(Record.ReadSubStmt()); + S->setInc(Record.readSubExpr()); + S->setBody(Record.readSubStmt()); S->setForLoc(ReadSourceLocation()); S->setLParenLoc(ReadSourceLocation()); S->setRParenLoc(ReadSourceLocation()); @@ -241,7 +241,7 @@ VisitStmt(S); S->setGotoLoc(ReadSourceLocation()); S->setStarLoc(ReadSourceLocation()); - S->setTarget(Record.ReadSubExpr()); + S->setTarget(Record.readSubExpr()); } void ASTStmtReader::VisitContinueStmt(ContinueStmt *S) { @@ -256,7 +256,7 @@ void ASTStmtReader::VisitReturnStmt(ReturnStmt *S) { VisitStmt(S); - S->setRetValue(Record.ReadSubExpr()); + S->setRetValue(Record.readSubExpr()); S->setReturnLoc(ReadSourceLocation()); S->setNRVOCandidate(ReadDeclAs()); } @@ -294,7 +294,7 @@ void ASTStmtReader::VisitGCCAsmStmt(GCCAsmStmt *S) { VisitAsmStmt(S); S->setRParenLoc(ReadSourceLocation()); - S->setAsmString(cast_or_null(Record.ReadSubStmt())); + S->setAsmString(cast_or_null(Record.readSubStmt())); unsigned NumOutputs = S->getNumOutputs(); unsigned NumInputs = S->getNumInputs(); @@ -305,15 +305,15 @@ SmallVector Constraints; SmallVector Exprs; for (unsigned I = 0, N = NumOutputs + NumInputs; I != N; ++I) { - Names.push_back(Record.GetIdentifierInfo()); - Constraints.push_back(cast_or_null(Record.ReadSubStmt())); - Exprs.push_back(Record.ReadSubStmt()); + Names.push_back(Record.getIdentifierInfo()); + Constraints.push_back(cast_or_null(Record.readSubStmt())); + Exprs.push_back(Record.readSubStmt()); } // Constraints SmallVector Clobbers; for (unsigned I = 0; I != NumClobbers; ++I) - Clobbers.push_back(cast_or_null(Record.ReadSubStmt())); + Clobbers.push_back(cast_or_null(Record.readSubStmt())); S->setOutputsAndInputsAndClobbers(Record.getContext(), Names.data(), Constraints.data(), @@ -332,7 +332,7 @@ SmallVector AsmToks; AsmToks.reserve(S->NumAsmToks); for (unsigned i = 0, e = S->NumAsmToks; i != e; ++i) { - AsmToks.push_back(Record.ReadToken()); + AsmToks.push_back(Record.readToken()); } // The calls to reserve() for the FooData vectors are mandatory to @@ -357,7 +357,7 @@ ConstraintsData.reserve(NumOperands); Constraints.reserve(NumOperands); for (unsigned i = 0; i != NumOperands; ++i) { - Exprs.push_back(cast(Record.ReadSubStmt())); + Exprs.push_back(cast(Record.readSubStmt())); ConstraintsData.push_back(ReadString()); Constraints.push_back(ConstraintsData.back()); } @@ -397,10 +397,10 @@ for (CapturedStmt::capture_init_iterator I = S->capture_init_begin(), E = S->capture_init_end(); I != E; ++I) - *I = Record.ReadSubExpr(); + *I = Record.readSubExpr(); // Body - S->setCapturedStmt(Record.ReadSubStmt()); + S->setCapturedStmt(Record.readSubStmt()); S->getCapturedDecl()->setBody(S->getCapturedStmt()); // Captures @@ -429,7 +429,7 @@ VisitExpr(E); E->setLocation(ReadSourceLocation()); E->Type = (PredefinedExpr::IdentType)Record.readInt(); - E->FnName = cast_or_null(Record.ReadSubExpr()); + E->FnName = cast_or_null(Record.readSubExpr()); } void ASTStmtReader::VisitDeclRefExpr(DeclRefExpr *E) { @@ -446,7 +446,7 @@ if (E->hasQualifier()) new (E->getTrailingObjects()) - NestedNameSpecifierLoc(Record.ReadNestedNameSpecifierLoc()); + NestedNameSpecifierLoc(Record.readNestedNameSpecifierLoc()); if (E->hasFoundDecl()) *E->getTrailingObjects() = ReadDeclAs(); @@ -464,20 +464,20 @@ void ASTStmtReader::VisitIntegerLiteral(IntegerLiteral *E) { VisitExpr(E); E->setLocation(ReadSourceLocation()); - E->setValue(Record.getContext(), Record.ReadAPInt()); + E->setValue(Record.getContext(), Record.readAPInt()); } void ASTStmtReader::VisitFloatingLiteral(FloatingLiteral *E) { VisitExpr(E); E->setRawSemantics(static_cast(Record.readInt())); E->setExact(Record.readInt()); - E->setValue(Record.getContext(), Record.ReadAPFloat(E->getSemantics())); + E->setValue(Record.getContext(), Record.readAPFloat(E->getSemantics())); E->setLocation(ReadSourceLocation()); } void ASTStmtReader::VisitImaginaryLiteral(ImaginaryLiteral *E) { VisitExpr(E); - E->setSubExpr(Record.ReadSubExpr()); + E->setSubExpr(Record.readSubExpr()); } void ASTStmtReader::VisitStringLiteral(StringLiteral *E) { @@ -512,7 +512,7 @@ VisitExpr(E); E->setLParen(ReadSourceLocation()); E->setRParen(ReadSourceLocation()); - E->setSubExpr(Record.ReadSubExpr()); + E->setSubExpr(Record.readSubExpr()); } void ASTStmtReader::VisitParenListExpr(ParenListExpr *E) { @@ -520,7 +520,7 @@ unsigned NumExprs = Record.readInt(); E->Exprs = new (Record.getContext()) Stmt*[NumExprs]; for (unsigned i = 0; i != NumExprs; ++i) - E->Exprs[i] = Record.ReadSubStmt(); + E->Exprs[i] = Record.readSubStmt(); E->NumExprs = NumExprs; E->LParenLoc = ReadSourceLocation(); E->RParenLoc = ReadSourceLocation(); @@ -528,7 +528,7 @@ void ASTStmtReader::VisitUnaryOperator(UnaryOperator *E) { VisitExpr(E); - E->setSubExpr(Record.ReadSubExpr()); + E->setSubExpr(Record.readSubExpr()); E->setOpcode((UnaryOperator::Opcode)Record.readInt()); E->setOperatorLoc(ReadSourceLocation()); } @@ -559,12 +559,12 @@ case OffsetOfNode::Identifier: E->setComponent( I, - OffsetOfNode(Start, Record.GetIdentifierInfo(), End)); + OffsetOfNode(Start, Record.getIdentifierInfo(), End)); break; case OffsetOfNode::Base: { CXXBaseSpecifier *Base = new (Record.getContext()) CXXBaseSpecifier(); - *Base = Record.ReadCXXBaseSpecifier(); + *Base = Record.readCXXBaseSpecifier(); E->setComponent(I, OffsetOfNode(Base)); break; } @@ -572,14 +572,14 @@ } for (unsigned I = 0, N = E->getNumExpressions(); I != N; ++I) - E->setIndexExpr(I, Record.ReadSubExpr()); + E->setIndexExpr(I, Record.readSubExpr()); } void ASTStmtReader::VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *E) { VisitExpr(E); E->setKind(static_cast(Record.readInt())); if (Record.peekInt() == 0) { - E->setArgument(Record.ReadSubExpr()); + E->setArgument(Record.readSubExpr()); Record.skipInts(1); } else { E->setArgument(GetTypeSourceInfo()); @@ -590,16 +590,16 @@ void ASTStmtReader::VisitArraySubscriptExpr(ArraySubscriptExpr *E) { VisitExpr(E); - E->setLHS(Record.ReadSubExpr()); - E->setRHS(Record.ReadSubExpr()); + E->setLHS(Record.readSubExpr()); + E->setRHS(Record.readSubExpr()); E->setRBracketLoc(ReadSourceLocation()); } void ASTStmtReader::VisitOMPArraySectionExpr(OMPArraySectionExpr *E) { VisitExpr(E); - E->setBase(Record.ReadSubExpr()); - E->setLowerBound(Record.ReadSubExpr()); - E->setLength(Record.ReadSubExpr()); + E->setBase(Record.readSubExpr()); + E->setLowerBound(Record.readSubExpr()); + E->setLength(Record.readSubExpr()); E->setColonLoc(ReadSourceLocation()); E->setRBracketLoc(ReadSourceLocation()); } @@ -608,9 +608,9 @@ VisitExpr(E); E->setNumArgs(Record.getContext(), Record.readInt()); E->setRParenLoc(ReadSourceLocation()); - E->setCallee(Record.ReadSubExpr()); + E->setCallee(Record.readSubExpr()); for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I) - E->setArg(I, Record.ReadSubExpr()); + E->setArg(I, Record.readSubExpr()); } void ASTStmtReader::VisitCXXMemberCallExpr(CXXMemberCallExpr *E) { @@ -625,7 +625,7 @@ void ASTStmtReader::VisitObjCIsaExpr(ObjCIsaExpr *E) { VisitExpr(E); - E->setBase(Record.ReadSubExpr()); + E->setBase(Record.readSubExpr()); E->setIsaMemberLoc(ReadSourceLocation()); E->setOpLoc(ReadSourceLocation()); E->setArrow(Record.readInt()); @@ -634,7 +634,7 @@ void ASTStmtReader:: VisitObjCIndirectCopyRestoreExpr(ObjCIndirectCopyRestoreExpr *E) { VisitExpr(E); - E->Operand = Record.ReadSubExpr(); + E->Operand = Record.readSubExpr(); E->setShouldCopy(Record.readInt()); } @@ -649,20 +649,20 @@ VisitExpr(E); unsigned NumBaseSpecs = Record.readInt(); assert(NumBaseSpecs == E->path_size()); - E->setSubExpr(Record.ReadSubExpr()); + E->setSubExpr(Record.readSubExpr()); E->setCastKind((CastKind)Record.readInt()); CastExpr::path_iterator BaseI = E->path_begin(); while (NumBaseSpecs--) { CXXBaseSpecifier *BaseSpec = new (Record.getContext()) CXXBaseSpecifier; - *BaseSpec = Record.ReadCXXBaseSpecifier(); + *BaseSpec = Record.readCXXBaseSpecifier(); *BaseI++ = BaseSpec; } } void ASTStmtReader::VisitBinaryOperator(BinaryOperator *E) { VisitExpr(E); - E->setLHS(Record.ReadSubExpr()); - E->setRHS(Record.ReadSubExpr()); + E->setLHS(Record.readSubExpr()); + E->setRHS(Record.readSubExpr()); E->setOpcode((BinaryOperator::Opcode)Record.readInt()); E->setOperatorLoc(ReadSourceLocation()); E->setFPContractable((bool)Record.readInt()); @@ -676,9 +676,9 @@ void ASTStmtReader::VisitConditionalOperator(ConditionalOperator *E) { VisitExpr(E); - E->SubExprs[ConditionalOperator::COND] = Record.ReadSubExpr(); - E->SubExprs[ConditionalOperator::LHS] = Record.ReadSubExpr(); - E->SubExprs[ConditionalOperator::RHS] = Record.ReadSubExpr(); + E->SubExprs[ConditionalOperator::COND] = Record.readSubExpr(); + E->SubExprs[ConditionalOperator::LHS] = Record.readSubExpr(); + E->SubExprs[ConditionalOperator::RHS] = Record.readSubExpr(); E->QuestionLoc = ReadSourceLocation(); E->ColonLoc = ReadSourceLocation(); } @@ -686,11 +686,11 @@ void ASTStmtReader::VisitBinaryConditionalOperator(BinaryConditionalOperator *E) { VisitExpr(E); - E->OpaqueValue = cast(Record.ReadSubExpr()); - E->SubExprs[BinaryConditionalOperator::COMMON] = Record.ReadSubExpr(); - E->SubExprs[BinaryConditionalOperator::COND] = Record.ReadSubExpr(); - E->SubExprs[BinaryConditionalOperator::LHS] = Record.ReadSubExpr(); - E->SubExprs[BinaryConditionalOperator::RHS] = Record.ReadSubExpr(); + E->OpaqueValue = cast(Record.readSubExpr()); + E->SubExprs[BinaryConditionalOperator::COMMON] = Record.readSubExpr(); + E->SubExprs[BinaryConditionalOperator::COND] = Record.readSubExpr(); + E->SubExprs[BinaryConditionalOperator::LHS] = Record.readSubExpr(); + E->SubExprs[BinaryConditionalOperator::RHS] = Record.readSubExpr(); E->QuestionLoc = ReadSourceLocation(); E->ColonLoc = ReadSourceLocation(); } @@ -714,27 +714,27 @@ VisitExpr(E); E->setLParenLoc(ReadSourceLocation()); E->setTypeSourceInfo(GetTypeSourceInfo()); - E->setInitializer(Record.ReadSubExpr()); + E->setInitializer(Record.readSubExpr()); E->setFileScope(Record.readInt()); } void ASTStmtReader::VisitExtVectorElementExpr(ExtVectorElementExpr *E) { VisitExpr(E); - E->setBase(Record.ReadSubExpr()); - E->setAccessor(Record.GetIdentifierInfo()); + E->setBase(Record.readSubExpr()); + E->setAccessor(Record.getIdentifierInfo()); E->setAccessorLoc(ReadSourceLocation()); } void ASTStmtReader::VisitInitListExpr(InitListExpr *E) { VisitExpr(E); - if (InitListExpr *SyntForm = cast_or_null(Record.ReadSubStmt())) + if (InitListExpr *SyntForm = cast_or_null(Record.readSubStmt())) E->setSyntacticForm(SyntForm); E->setLBraceLoc(ReadSourceLocation()); E->setRBraceLoc(ReadSourceLocation()); bool isArrayFiller = Record.readInt(); Expr *filler = nullptr; if (isArrayFiller) { - filler = Record.ReadSubExpr(); + filler = Record.readSubExpr(); E->ArrayFillerOrUnionFieldInit = filler; } else E->ArrayFillerOrUnionFieldInit = ReadDeclAs(); @@ -743,12 +743,12 @@ E->reserveInits(Record.getContext(), NumInits); if (isArrayFiller) { for (unsigned I = 0; I != NumInits; ++I) { - Expr *init = Record.ReadSubExpr(); + Expr *init = Record.readSubExpr(); E->updateInit(Record.getContext(), I, init ? init : filler); } } else { for (unsigned I = 0; I != NumInits; ++I) - E->updateInit(Record.getContext(), I, Record.ReadSubExpr()); + E->updateInit(Record.getContext(), I, Record.readSubExpr()); } } @@ -759,7 +759,7 @@ unsigned NumSubExprs = Record.readInt(); assert(NumSubExprs == E->getNumSubExprs() && "Wrong number of subexprs"); for (unsigned I = 0; I != NumSubExprs; ++I) - E->setSubExpr(I, Record.ReadSubExpr()); + E->setSubExpr(I, Record.readSubExpr()); E->setEqualOrColonLoc(ReadSourceLocation()); E->setGNUSyntax(Record.readInt()); @@ -777,7 +777,7 @@ } case DESIG_FIELD_NAME: { - const IdentifierInfo *Name = Record.GetIdentifierInfo(); + const IdentifierInfo *Name = Record.getIdentifierInfo(); SourceLocation DotLoc = ReadSourceLocation(); SourceLocation FieldLoc = ReadSourceLocation(); Designators.push_back(Designator(Name, DotLoc, FieldLoc)); @@ -809,8 +809,8 @@ void ASTStmtReader::VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *E) { VisitExpr(E); - E->setBase(Record.ReadSubExpr()); - E->setUpdater(Record.ReadSubExpr()); + E->setBase(Record.readSubExpr()); + E->setUpdater(Record.readSubExpr()); } void ASTStmtReader::VisitNoInitExpr(NoInitExpr *E) { @@ -819,8 +819,8 @@ void ASTStmtReader::VisitArrayInitLoopExpr(ArrayInitLoopExpr *E) { VisitExpr(E); - E->SubExprs[0] = Record.ReadSubExpr(); - E->SubExprs[1] = Record.ReadSubExpr(); + E->SubExprs[0] = Record.readSubExpr(); + E->SubExprs[1] = Record.readSubExpr(); } void ASTStmtReader::VisitArrayInitIndexExpr(ArrayInitIndexExpr *E) { @@ -833,7 +833,7 @@ void ASTStmtReader::VisitVAArgExpr(VAArgExpr *E) { VisitExpr(E); - E->setSubExpr(Record.ReadSubExpr()); + E->setSubExpr(Record.readSubExpr()); E->setWrittenTypeInfo(GetTypeSourceInfo()); E->setBuiltinLoc(ReadSourceLocation()); E->setRParenLoc(ReadSourceLocation()); @@ -851,14 +851,14 @@ VisitExpr(E); E->setLParenLoc(ReadSourceLocation()); E->setRParenLoc(ReadSourceLocation()); - E->setSubStmt(cast_or_null(Record.ReadSubStmt())); + E->setSubStmt(cast_or_null(Record.readSubStmt())); } void ASTStmtReader::VisitChooseExpr(ChooseExpr *E) { VisitExpr(E); - E->setCond(Record.ReadSubExpr()); - E->setLHS(Record.ReadSubExpr()); - E->setRHS(Record.ReadSubExpr()); + E->setCond(Record.readSubExpr()); + E->setLHS(Record.readSubExpr()); + E->setRHS(Record.readSubExpr()); E->setBuiltinLoc(ReadSourceLocation()); E->setRParenLoc(ReadSourceLocation()); E->setIsConditionTrue(Record.readInt()); @@ -874,7 +874,7 @@ SmallVector Exprs; unsigned NumExprs = Record.readInt(); while (NumExprs--) - Exprs.push_back(Record.ReadSubExpr()); + Exprs.push_back(Record.readSubExpr()); E->setExprs(Record.getContext(), Exprs); E->setBuiltinLoc(ReadSourceLocation()); E->setRParenLoc(ReadSourceLocation()); @@ -885,7 +885,7 @@ E->BuiltinLoc = ReadSourceLocation(); E->RParenLoc = ReadSourceLocation(); E->TInfo = GetTypeSourceInfo(); - E->SrcExpr = Record.ReadSubExpr(); + E->SrcExpr = Record.readSubExpr(); } void ASTStmtReader::VisitBlockExpr(BlockExpr *E) { @@ -900,10 +900,10 @@ E->SubExprs = new(Record.getContext()) Stmt*[GenericSelectionExpr::END_EXPR+E->NumAssocs]; - E->SubExprs[GenericSelectionExpr::CONTROLLING] = Record.ReadSubExpr(); + E->SubExprs[GenericSelectionExpr::CONTROLLING] = Record.readSubExpr(); for (unsigned I = 0, N = E->getNumAssocs(); I != N; ++I) { E->AssocTypes[I] = GetTypeSourceInfo(); - E->SubExprs[GenericSelectionExpr::END_EXPR+I] = Record.ReadSubExpr(); + E->SubExprs[GenericSelectionExpr::END_EXPR+I] = Record.readSubExpr(); } E->ResultIndex = Record.readInt(); @@ -919,11 +919,11 @@ E->PseudoObjectExprBits.ResultIndex = Record.readInt(); // Read the syntactic expression. - E->getSubExprsBuffer()[0] = Record.ReadSubExpr(); + E->getSubExprsBuffer()[0] = Record.readSubExpr(); // Read all the semantic expressions. for (unsigned i = 0; i != numSemanticExprs; ++i) { - Expr *subExpr = Record.ReadSubExpr(); + Expr *subExpr = Record.readSubExpr(); E->getSubExprsBuffer()[i+1] = subExpr; } } @@ -933,7 +933,7 @@ E->Op = AtomicExpr::AtomicOp(Record.readInt()); E->NumSubExprs = AtomicExpr::getNumSubExprs(E->Op); for (unsigned I = 0; I != E->NumSubExprs; ++I) - E->SubExprs[I] = Record.ReadSubExpr(); + E->SubExprs[I] = Record.readSubExpr(); E->BuiltinLoc = ReadSourceLocation(); E->RParenLoc = ReadSourceLocation(); } @@ -943,14 +943,14 @@ void ASTStmtReader::VisitObjCStringLiteral(ObjCStringLiteral *E) { VisitExpr(E); - E->setString(cast(Record.ReadSubStmt())); + E->setString(cast(Record.readSubStmt())); E->setAtLoc(ReadSourceLocation()); } void ASTStmtReader::VisitObjCBoxedExpr(ObjCBoxedExpr *E) { VisitExpr(E); // could be one of several IntegerLiteral, FloatLiteral, etc. - E->SubExpr = Record.ReadSubStmt(); + E->SubExpr = Record.readSubStmt(); E->BoxingMethod = ReadDeclAs(); E->Range = ReadSourceRange(); } @@ -961,7 +961,7 @@ assert(NumElements == E->getNumElements() && "Wrong number of elements"); Expr **Elements = E->getElements(); for (unsigned I = 0, N = NumElements; I != N; ++I) - Elements[I] = Record.ReadSubExpr(); + Elements[I] = Record.readSubExpr(); E->ArrayWithObjectsMethod = ReadDeclAs(); E->Range = ReadSourceRange(); } @@ -977,8 +977,8 @@ ObjCDictionaryLiteral::ExpansionData *Expansions = E->getTrailingObjects(); for (unsigned I = 0; I != NumElements; ++I) { - KeyValues[I].Key = Record.ReadSubExpr(); - KeyValues[I].Value = Record.ReadSubExpr(); + KeyValues[I].Key = Record.readSubExpr(); + KeyValues[I].Value = Record.readSubExpr(); if (HasPackExpansions) { Expansions[I].EllipsisLoc = ReadSourceLocation(); Expansions[I].NumExpansionsPlusOne = Record.readInt(); @@ -997,7 +997,7 @@ void ASTStmtReader::VisitObjCSelectorExpr(ObjCSelectorExpr *E) { VisitExpr(E); - E->setSelector(Record.ReadSelector()); + E->setSelector(Record.readSelector()); E->setAtLoc(ReadSourceLocation()); E->setRParenLoc(ReadSourceLocation()); } @@ -1015,7 +1015,7 @@ E->setDecl(ReadDeclAs()); E->setLocation(ReadSourceLocation()); E->setOpLoc(ReadSourceLocation()); - E->setBase(Record.ReadSubExpr()); + E->setBase(Record.readSubExpr()); E->setIsArrow(Record.readInt()); E->setIsFreeIvar(Record.readInt()); } @@ -1035,7 +1035,7 @@ E->setReceiverLocation(ReadSourceLocation()); switch (Record.readInt()) { case 0: - E->setBase(Record.ReadSubExpr()); + E->setBase(Record.readSubExpr()); break; case 1: E->setSuperReceiver(Record.readType()); @@ -1049,8 +1049,8 @@ void ASTStmtReader::VisitObjCSubscriptRefExpr(ObjCSubscriptRefExpr *E) { VisitExpr(E); E->setRBracket(ReadSourceLocation()); - E->setBaseExpr(Record.ReadSubExpr()); - E->setKeyExpr(Record.ReadSubExpr()); + E->setBaseExpr(Record.readSubExpr()); + E->setKeyExpr(Record.readSubExpr()); E->GetAtIndexMethodDecl = ReadDeclAs(); E->SetAtIndexMethodDecl = ReadDeclAs(); } @@ -1067,7 +1067,7 @@ = static_cast(Record.readInt()); switch (Kind) { case ObjCMessageExpr::Instance: - E->setInstanceReceiver(Record.ReadSubExpr()); + E->setInstanceReceiver(Record.readSubExpr()); break; case ObjCMessageExpr::Class: @@ -1088,13 +1088,13 @@ if (Record.readInt()) E->setMethodDecl(ReadDeclAs()); else - E->setSelector(Record.ReadSelector()); + E->setSelector(Record.readSelector()); E->LBracLoc = ReadSourceLocation(); E->RBracLoc = ReadSourceLocation(); for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I) - E->setArg(I, Record.ReadSubExpr()); + E->setArg(I, Record.readSubExpr()); SourceLocation *Locs = E->getStoredSelLocs(); for (unsigned I = 0; I != NumStoredSelLocs; ++I) @@ -1103,16 +1103,16 @@ void ASTStmtReader::VisitObjCForCollectionStmt(ObjCForCollectionStmt *S) { VisitStmt(S); - S->setElement(Record.ReadSubStmt()); - S->setCollection(Record.ReadSubExpr()); - S->setBody(Record.ReadSubStmt()); + S->setElement(Record.readSubStmt()); + S->setCollection(Record.readSubExpr()); + S->setBody(Record.readSubStmt()); S->setForLoc(ReadSourceLocation()); S->setRParenLoc(ReadSourceLocation()); } void ASTStmtReader::VisitObjCAtCatchStmt(ObjCAtCatchStmt *S) { VisitStmt(S); - S->setCatchBody(Record.ReadSubStmt()); + S->setCatchBody(Record.readSubStmt()); S->setCatchParamDecl(ReadDeclAs()); S->setAtCatchLoc(ReadSourceLocation()); S->setRParenLoc(ReadSourceLocation()); @@ -1120,13 +1120,13 @@ void ASTStmtReader::VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *S) { VisitStmt(S); - S->setFinallyBody(Record.ReadSubStmt()); + S->setFinallyBody(Record.readSubStmt()); S->setAtFinallyLoc(ReadSourceLocation()); } void ASTStmtReader::VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *S) { VisitStmt(S); - S->setSubStmt(Record.ReadSubStmt()); + S->setSubStmt(Record.readSubStmt()); S->setAtLoc(ReadSourceLocation()); } @@ -1135,25 +1135,25 @@ assert(Record.peekInt() == S->getNumCatchStmts()); Record.skipInts(1); bool HasFinally = Record.readInt(); - S->setTryBody(Record.ReadSubStmt()); + S->setTryBody(Record.readSubStmt()); for (unsigned I = 0, N = S->getNumCatchStmts(); I != N; ++I) - S->setCatchStmt(I, cast_or_null(Record.ReadSubStmt())); + S->setCatchStmt(I, cast_or_null(Record.readSubStmt())); if (HasFinally) - S->setFinallyStmt(Record.ReadSubStmt()); + S->setFinallyStmt(Record.readSubStmt()); S->setAtTryLoc(ReadSourceLocation()); } void ASTStmtReader::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *S) { VisitStmt(S); - S->setSynchExpr(Record.ReadSubStmt()); - S->setSynchBody(Record.ReadSubStmt()); + S->setSynchExpr(Record.readSubStmt()); + S->setSynchBody(Record.readSubStmt()); S->setAtSynchronizedLoc(ReadSourceLocation()); } void ASTStmtReader::VisitObjCAtThrowStmt(ObjCAtThrowStmt *S) { VisitStmt(S); - S->setThrowExpr(Record.ReadSubStmt()); + S->setThrowExpr(Record.readSubStmt()); S->setThrowLoc(ReadSourceLocation()); } @@ -1165,10 +1165,10 @@ void ASTStmtReader::VisitObjCAvailabilityCheckExpr(ObjCAvailabilityCheckExpr *E) { VisitExpr(E); - SourceRange R = Record.ReadSourceRange(); + SourceRange R = Record.readSourceRange(); E->AtLoc = R.getBegin(); E->RParen = R.getEnd(); - E->VersionToCheck = Record.ReadVersionTuple(); + E->VersionToCheck = Record.readVersionTuple(); } //===----------------------------------------------------------------------===// @@ -1179,7 +1179,7 @@ VisitStmt(S); S->CatchLoc = ReadSourceLocation(); S->ExceptionDecl = ReadDeclAs(); - S->HandlerBlock = Record.ReadSubStmt(); + S->HandlerBlock = Record.readSubStmt(); } void ASTStmtReader::VisitCXXTryStmt(CXXTryStmt *S) { @@ -1187,9 +1187,9 @@ assert(Record.peekInt() == S->getNumHandlers() && "NumStmtFields is wrong ?"); Record.skipInts(1); S->TryLoc = ReadSourceLocation(); - S->getStmts()[0] = Record.ReadSubStmt(); + S->getStmts()[0] = Record.readSubStmt(); for (unsigned i = 0, e = S->getNumHandlers(); i != e; ++i) - S->getStmts()[i + 1] = Record.ReadSubStmt(); + S->getStmts()[i + 1] = Record.readSubStmt(); } void ASTStmtReader::VisitCXXForRangeStmt(CXXForRangeStmt *S) { @@ -1198,28 +1198,28 @@ S->CoawaitLoc = ReadSourceLocation(); S->ColonLoc = ReadSourceLocation(); S->RParenLoc = ReadSourceLocation(); - S->setRangeStmt(Record.ReadSubStmt()); - S->setBeginStmt(Record.ReadSubStmt()); - S->setEndStmt(Record.ReadSubStmt()); - S->setCond(Record.ReadSubExpr()); - S->setInc(Record.ReadSubExpr()); - S->setLoopVarStmt(Record.ReadSubStmt()); - S->setBody(Record.ReadSubStmt()); + S->setRangeStmt(Record.readSubStmt()); + S->setBeginStmt(Record.readSubStmt()); + S->setEndStmt(Record.readSubStmt()); + S->setCond(Record.readSubExpr()); + S->setInc(Record.readSubExpr()); + S->setLoopVarStmt(Record.readSubStmt()); + S->setBody(Record.readSubStmt()); } void ASTStmtReader::VisitMSDependentExistsStmt(MSDependentExistsStmt *S) { VisitStmt(S); S->KeywordLoc = ReadSourceLocation(); S->IsIfExists = Record.readInt(); - S->QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + S->QualifierLoc = Record.readNestedNameSpecifierLoc(); ReadDeclarationNameInfo(S->NameInfo); - S->SubStmt = Record.ReadSubStmt(); + S->SubStmt = Record.readSubStmt(); } void ASTStmtReader::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) { VisitCallExpr(E); E->Operator = (OverloadedOperatorKind)Record.readInt(); - E->Range = Record.ReadSourceRange(); + E->Range = Record.readSourceRange(); E->setFPContractable((bool)Record.readInt()); } @@ -1229,7 +1229,7 @@ if (E->NumArgs) E->Args = new (Record.getContext()) Stmt*[E->NumArgs]; for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I) - E->setArg(I, Record.ReadSubExpr()); + E->setArg(I, Record.readSubExpr()); E->setConstructor(ReadDeclAs()); E->setLocation(ReadSourceLocation()); E->setElidable(Record.readInt()); @@ -1269,13 +1269,13 @@ for (LambdaExpr::capture_init_iterator C = E->capture_init_begin(), CEnd = E->capture_init_end(); C != CEnd; ++C) - *C = Record.ReadSubExpr(); + *C = Record.readSubExpr(); } void ASTStmtReader::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) { VisitExpr(E); - E->SubExpr = Record.ReadSubExpr(); + E->SubExpr = Record.readSubExpr(); } void ASTStmtReader::VisitCXXNamedCastExpr(CXXNamedCastExpr *E) { @@ -1335,7 +1335,7 @@ } // typeid(42+2) - E->setExprOperand(Record.ReadSubExpr()); + E->setExprOperand(Record.readSubExpr()); } void ASTStmtReader::VisitCXXThisExpr(CXXThisExpr *E) { @@ -1347,7 +1347,7 @@ void ASTStmtReader::VisitCXXThrowExpr(CXXThrowExpr *E) { VisitExpr(E); E->ThrowLoc = ReadSourceLocation(); - E->Op = Record.ReadSubExpr(); + E->Op = Record.readSubExpr(); E->IsThrownVariableInScope = Record.readInt(); } @@ -1365,8 +1365,8 @@ void ASTStmtReader::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) { VisitExpr(E); - E->setTemporary(Record.ReadCXXTemporary()); - E->setSubExpr(Record.ReadSubExpr()); + E->setTemporary(Record.readCXXTemporary()); + E->setSubExpr(Record.readSubExpr()); } void ASTStmtReader::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) { @@ -1396,7 +1396,7 @@ // Install all the subexpressions. for (CXXNewExpr::raw_arg_iterator I = E->raw_arg_begin(),e = E->raw_arg_end(); I != e; ++I) - *I = Record.ReadSubStmt(); + *I = Record.readSubStmt(); } void ASTStmtReader::VisitCXXDeleteExpr(CXXDeleteExpr *E) { @@ -1406,22 +1406,22 @@ E->ArrayFormAsWritten = Record.readInt(); E->UsualArrayDeleteWantsSize = Record.readInt(); E->OperatorDelete = ReadDeclAs(); - E->Argument = Record.ReadSubExpr(); + E->Argument = Record.readSubExpr(); E->Loc = ReadSourceLocation(); } void ASTStmtReader::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) { VisitExpr(E); - E->Base = Record.ReadSubExpr(); + E->Base = Record.readSubExpr(); E->IsArrow = Record.readInt(); E->OperatorLoc = ReadSourceLocation(); - E->QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + E->QualifierLoc = Record.readNestedNameSpecifierLoc(); E->ScopeType = GetTypeSourceInfo(); E->ColonColonLoc = ReadSourceLocation(); E->TildeLoc = ReadSourceLocation(); - IdentifierInfo *II = Record.GetIdentifierInfo(); + IdentifierInfo *II = Record.getIdentifierInfo(); if (II) E->setDestroyedType(II, ReadSourceLocation()); else @@ -1438,7 +1438,7 @@ ReadDeclAs(); E->ExprWithCleanupsBits.CleanupsHaveSideEffects = Record.readInt(); - E->SubExpr = Record.ReadSubExpr(); + E->SubExpr = Record.readSubExpr(); } void @@ -1451,11 +1451,11 @@ E->getTrailingObjects(), /*NumTemplateArgs=*/Record.readInt()); - E->Base = Record.ReadSubExpr(); + E->Base = Record.readSubExpr(); E->BaseType = Record.readType(); E->IsArrow = Record.readInt(); E->OperatorLoc = ReadSourceLocation(); - E->QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + E->QualifierLoc = Record.readNestedNameSpecifierLoc(); E->FirstQualifierFoundInScope = ReadDeclAs(); ReadDeclarationNameInfo(E->MemberNameInfo); } @@ -1470,7 +1470,7 @@ E->getTrailingObjects(), /*NumTemplateArgs=*/Record.readInt()); - E->QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + E->QualifierLoc = Record.readNestedNameSpecifierLoc(); ReadDeclarationNameInfo(E->NameInfo); } @@ -1481,7 +1481,7 @@ "Read wrong record during creation ?"); Record.skipInts(1); for (unsigned I = 0, N = E->arg_size(); I != N; ++I) - E->setArg(I, Record.ReadSubExpr()); + E->setArg(I, Record.readSubExpr()); E->Type = GetTypeSourceInfo(); E->setLParenLoc(ReadSourceLocation()); E->setRParenLoc(ReadSourceLocation()); @@ -1505,14 +1505,14 @@ E->initializeResults(Record.getContext(), Decls.begin(), Decls.end()); ReadDeclarationNameInfo(E->NameInfo); - E->QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + E->QualifierLoc = Record.readNestedNameSpecifierLoc(); } void ASTStmtReader::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *E) { VisitOverloadExpr(E); E->IsArrow = Record.readInt(); E->HasUnresolvedUsing = Record.readInt(); - E->Base = Record.ReadSubExpr(); + E->Base = Record.readSubExpr(); E->BaseType = Record.readType(); E->OperatorLoc = ReadSourceLocation(); } @@ -1546,7 +1546,7 @@ E->Loc = Range.getBegin(); E->RParen = Range.getEnd(); E->QueriedType = GetTypeSourceInfo(); - E->Dimension = Record.ReadSubExpr(); + E->Dimension = Record.readSubExpr(); } void ASTStmtReader::VisitExpressionTraitExpr(ExpressionTraitExpr *E) { @@ -1554,7 +1554,7 @@ E->ET = (ExpressionTrait)Record.readInt(); E->Value = (bool)Record.readInt(); SourceRange Range = ReadSourceRange(); - E->QueriedExpression = Record.ReadSubExpr(); + E->QueriedExpression = Record.readSubExpr(); E->Loc = Range.getBegin(); E->RParen = Range.getEnd(); } @@ -1563,14 +1563,14 @@ VisitExpr(E); E->Value = (bool)Record.readInt(); E->Range = ReadSourceRange(); - E->Operand = Record.ReadSubExpr(); + E->Operand = Record.readSubExpr(); } void ASTStmtReader::VisitPackExpansionExpr(PackExpansionExpr *E) { VisitExpr(E); E->EllipsisLoc = ReadSourceLocation(); E->NumExpansions = Record.readInt(); - E->Pattern = Record.ReadSubExpr(); + E->Pattern = Record.readSubExpr(); } void ASTStmtReader::VisitSizeOfPackExpr(SizeOfPackExpr *E) { @@ -1579,13 +1579,13 @@ E->OperatorLoc = ReadSourceLocation(); E->PackLoc = ReadSourceLocation(); E->RParenLoc = ReadSourceLocation(); - E->Pack = Record.ReadDeclAs(); + E->Pack = Record.readDeclAs(); if (E->isPartiallySubstituted()) { assert(E->Length == NumPartialArgs); for (auto *I = E->getTrailingObjects(), *E = I + NumPartialArgs; I != E; ++I) - new (I) TemplateArgument(Record.ReadTemplateArgument()); + new (I) TemplateArgument(Record.readTemplateArgument()); } else if (!E->isValueDependent()) { E->Length = Record.readInt(); } @@ -1596,14 +1596,14 @@ VisitExpr(E); E->Param = ReadDeclAs(); E->NameLoc = ReadSourceLocation(); - E->Replacement = Record.ReadSubExpr(); + E->Replacement = Record.readSubExpr(); } void ASTStmtReader::VisitSubstNonTypeTemplateParmPackExpr( SubstNonTypeTemplateParmPackExpr *E) { VisitExpr(E); E->Param = ReadDeclAs(); - TemplateArgument ArgPack = Record.ReadTemplateArgument(); + TemplateArgument ArgPack = Record.readTemplateArgument(); if (ArgPack.getKind() != TemplateArgument::Pack) return; @@ -1624,7 +1624,7 @@ void ASTStmtReader::VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E) { VisitExpr(E); - E->State = Record.ReadSubExpr(); + E->State = Record.readSubExpr(); auto VD = ReadDeclAs(); unsigned ManglingNumber = Record.readInt(); E->setExtendingDecl(VD, ManglingNumber); @@ -1635,14 +1635,14 @@ E->LParenLoc = ReadSourceLocation(); E->EllipsisLoc = ReadSourceLocation(); E->RParenLoc = ReadSourceLocation(); - E->SubExprs[0] = Record.ReadSubExpr(); - E->SubExprs[1] = Record.ReadSubExpr(); + E->SubExprs[0] = Record.readSubExpr(); + E->SubExprs[1] = Record.readSubExpr(); E->Opcode = (BinaryOperatorKind)Record.readInt(); } void ASTStmtReader::VisitOpaqueValueExpr(OpaqueValueExpr *E) { VisitExpr(E); - E->SourceExpr = Record.ReadSubExpr(); + E->SourceExpr = Record.readSubExpr(); E->Loc = ReadSourceLocation(); } @@ -1656,16 +1656,16 @@ void ASTStmtReader::VisitMSPropertyRefExpr(MSPropertyRefExpr *E) { VisitExpr(E); E->IsArrow = (Record.readInt() != 0); - E->BaseExpr = Record.ReadSubExpr(); - E->QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + E->BaseExpr = Record.readSubExpr(); + E->QualifierLoc = Record.readNestedNameSpecifierLoc(); E->MemberLoc = ReadSourceLocation(); E->TheDecl = ReadDeclAs(); } void ASTStmtReader::VisitMSPropertySubscriptExpr(MSPropertySubscriptExpr *E) { VisitExpr(E); - E->setBase(Record.ReadSubExpr()); - E->setIdx(Record.ReadSubExpr()); + E->setBase(Record.readSubExpr()); + E->setIdx(Record.readSubExpr()); E->setRBracketLoc(ReadSourceLocation()); } @@ -1681,7 +1681,7 @@ } // __uuidof(expr) - E->setExprOperand(Record.ReadSubExpr()); + E->setExprOperand(Record.readSubExpr()); } void ASTStmtReader::VisitSEHLeaveStmt(SEHLeaveStmt *S) { @@ -1692,22 +1692,22 @@ void ASTStmtReader::VisitSEHExceptStmt(SEHExceptStmt *S) { VisitStmt(S); S->Loc = ReadSourceLocation(); - S->Children[SEHExceptStmt::FILTER_EXPR] = Record.ReadSubStmt(); - S->Children[SEHExceptStmt::BLOCK] = Record.ReadSubStmt(); + S->Children[SEHExceptStmt::FILTER_EXPR] = Record.readSubStmt(); + S->Children[SEHExceptStmt::BLOCK] = Record.readSubStmt(); } void ASTStmtReader::VisitSEHFinallyStmt(SEHFinallyStmt *S) { VisitStmt(S); S->Loc = ReadSourceLocation(); - S->Block = Record.ReadSubStmt(); + S->Block = Record.readSubStmt(); } void ASTStmtReader::VisitSEHTryStmt(SEHTryStmt *S) { VisitStmt(S); S->IsCXXTry = Record.readInt(); S->TryLoc = ReadSourceLocation(); - S->Children[SEHTryStmt::TRY] = Record.ReadSubStmt(); - S->Children[SEHTryStmt::HANDLER] = Record.ReadSubStmt(); + S->Children[SEHTryStmt::TRY] = Record.readSubStmt(); + S->Children[SEHTryStmt::HANDLER] = Record.readSubStmt(); } //===----------------------------------------------------------------------===// @@ -1716,7 +1716,7 @@ void ASTStmtReader::VisitCUDAKernelCallExpr(CUDAKernelCallExpr *E) { VisitCallExpr(E); - E->setConfig(cast(Record.ReadSubExpr())); + E->setConfig(cast(Record.readSubExpr())); } //===----------------------------------------------------------------------===// @@ -1726,7 +1726,7 @@ VisitExpr(E); E->BuiltinLoc = ReadSourceLocation(); E->RParenLoc = ReadSourceLocation(); - E->SrcExpr = Record.ReadSubExpr(); + E->SrcExpr = Record.readSubExpr(); } //===----------------------------------------------------------------------===// @@ -1928,44 +1928,44 @@ } void OMPClauseReader::VisitOMPClauseWithPreInit(OMPClauseWithPreInit *C) { - C->setPreInitStmt(Reader->Record.ReadSubStmt()); + C->setPreInitStmt(Reader->Record.readSubStmt()); } void OMPClauseReader::VisitOMPClauseWithPostUpdate(OMPClauseWithPostUpdate *C) { VisitOMPClauseWithPreInit(C); - C->setPostUpdateExpr(Reader->Record.ReadSubExpr()); + C->setPostUpdateExpr(Reader->Record.readSubExpr()); } void OMPClauseReader::VisitOMPIfClause(OMPIfClause *C) { C->setNameModifier(static_cast(Reader->Record.readInt())); C->setNameModifierLoc(Reader->ReadSourceLocation()); C->setColonLoc(Reader->ReadSourceLocation()); - C->setCondition(Reader->Record.ReadSubExpr()); + C->setCondition(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } void OMPClauseReader::VisitOMPFinalClause(OMPFinalClause *C) { - C->setCondition(Reader->Record.ReadSubExpr()); + C->setCondition(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } void OMPClauseReader::VisitOMPNumThreadsClause(OMPNumThreadsClause *C) { - C->setNumThreads(Reader->Record.ReadSubExpr()); + C->setNumThreads(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } void OMPClauseReader::VisitOMPSafelenClause(OMPSafelenClause *C) { - C->setSafelen(Reader->Record.ReadSubExpr()); + C->setSafelen(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } void OMPClauseReader::VisitOMPSimdlenClause(OMPSimdlenClause *C) { - C->setSimdlen(Reader->Record.ReadSubExpr()); + C->setSimdlen(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } void OMPClauseReader::VisitOMPCollapseClause(OMPCollapseClause *C) { - C->setNumForLoops(Reader->Record.ReadSubExpr()); + C->setNumForLoops(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } @@ -1991,7 +1991,7 @@ static_cast(Reader->Record.readInt())); C->setSecondScheduleModifier( static_cast(Reader->Record.readInt())); - C->setChunkSize(Reader->Record.ReadSubExpr()); + C->setChunkSize(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); C->setFirstScheduleModifierLoc(Reader->ReadSourceLocation()); C->setSecondScheduleModifierLoc(Reader->ReadSourceLocation()); @@ -2000,7 +2000,7 @@ } void OMPClauseReader::VisitOMPOrderedClause(OMPOrderedClause *C) { - C->setNumForLoops(Reader->Record.ReadSubExpr()); + C->setNumForLoops(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } @@ -2032,11 +2032,11 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setPrivateCopies(Vars); } @@ -2047,15 +2047,15 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setPrivateCopies(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setInits(Vars); } @@ -2066,23 +2066,23 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setPrivateCopies(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setSourceExprs(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setDestinationExprs(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setAssignmentOps(Vars); } @@ -2092,7 +2092,7 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); } @@ -2100,7 +2100,7 @@ VisitOMPClauseWithPostUpdate(C); C->setLParenLoc(Reader->ReadSourceLocation()); C->setColonLoc(Reader->ReadSourceLocation()); - NestedNameSpecifierLoc NNSL = Reader->Record.ReadNestedNameSpecifierLoc(); + NestedNameSpecifierLoc NNSL = Reader->Record.readNestedNameSpecifierLoc(); DeclarationNameInfo DNI; Reader->ReadDeclarationNameInfo(DNI); C->setQualifierLoc(NNSL); @@ -2110,23 +2110,23 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setPrivates(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setLHSExprs(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setRHSExprs(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setReductionOps(Vars); } @@ -2140,26 +2140,26 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setPrivates(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setInits(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setUpdates(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setFinals(Vars); - C->setStep(Reader->Record.ReadSubExpr()); - C->setCalcStep(Reader->Record.ReadSubExpr()); + C->setStep(Reader->Record.readSubExpr()); + C->setCalcStep(Reader->Record.readSubExpr()); } void OMPClauseReader::VisitOMPAlignedClause(OMPAlignedClause *C) { @@ -2169,9 +2169,9 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); - C->setAlignment(Reader->Record.ReadSubExpr()); + C->setAlignment(Reader->Record.readSubExpr()); } void OMPClauseReader::VisitOMPCopyinClause(OMPCopyinClause *C) { @@ -2180,19 +2180,19 @@ SmallVector Exprs; Exprs.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Exprs.push_back(Reader->Record.ReadSubExpr()); + Exprs.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Exprs); Exprs.clear(); for (unsigned i = 0; i != NumVars; ++i) - Exprs.push_back(Reader->Record.ReadSubExpr()); + Exprs.push_back(Reader->Record.readSubExpr()); C->setSourceExprs(Exprs); Exprs.clear(); for (unsigned i = 0; i != NumVars; ++i) - Exprs.push_back(Reader->Record.ReadSubExpr()); + Exprs.push_back(Reader->Record.readSubExpr()); C->setDestinationExprs(Exprs); Exprs.clear(); for (unsigned i = 0; i != NumVars; ++i) - Exprs.push_back(Reader->Record.ReadSubExpr()); + Exprs.push_back(Reader->Record.readSubExpr()); C->setAssignmentOps(Exprs); } @@ -2202,19 +2202,19 @@ SmallVector Exprs; Exprs.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Exprs.push_back(Reader->Record.ReadSubExpr()); + Exprs.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Exprs); Exprs.clear(); for (unsigned i = 0; i != NumVars; ++i) - Exprs.push_back(Reader->Record.ReadSubExpr()); + Exprs.push_back(Reader->Record.readSubExpr()); C->setSourceExprs(Exprs); Exprs.clear(); for (unsigned i = 0; i != NumVars; ++i) - Exprs.push_back(Reader->Record.ReadSubExpr()); + Exprs.push_back(Reader->Record.readSubExpr()); C->setDestinationExprs(Exprs); Exprs.clear(); for (unsigned i = 0; i != NumVars; ++i) - Exprs.push_back(Reader->Record.ReadSubExpr()); + Exprs.push_back(Reader->Record.readSubExpr()); C->setAssignmentOps(Exprs); } @@ -2224,7 +2224,7 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); } @@ -2238,13 +2238,13 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); - C->setCounterValue(Reader->Record.ReadSubExpr()); + C->setCounterValue(Reader->Record.readSubExpr()); } void OMPClauseReader::VisitOMPDeviceClause(OMPDeviceClause *C) { - C->setDevice(Reader->Record.ReadSubExpr()); + C->setDevice(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } @@ -2264,13 +2264,13 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); SmallVector Decls; Decls.reserve(UniqueDecls); for (unsigned i = 0; i < UniqueDecls; ++i) - Decls.push_back(Reader->Record.ReadDeclAs()); + Decls.push_back(Reader->Record.readDeclAs()); C->setUniqueDecls(Decls); SmallVector ListsPerDecl; @@ -2288,8 +2288,8 @@ SmallVector Components; Components.reserve(TotalComponents); for (unsigned i = 0; i < TotalComponents; ++i) { - Expr *AssociatedExpr = Reader->Record.ReadSubExpr(); - ValueDecl *AssociatedDecl = Reader->Record.ReadDeclAs(); + Expr *AssociatedExpr = Reader->Record.readSubExpr(); + ValueDecl *AssociatedDecl = Reader->Record.readDeclAs(); Components.push_back(OMPClauseMappableExprCommon::MappableComponent( AssociatedExpr, AssociatedDecl)); } @@ -2297,32 +2297,32 @@ } void OMPClauseReader::VisitOMPNumTeamsClause(OMPNumTeamsClause *C) { - C->setNumTeams(Reader->Record.ReadSubExpr()); + C->setNumTeams(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } void OMPClauseReader::VisitOMPThreadLimitClause(OMPThreadLimitClause *C) { - C->setThreadLimit(Reader->Record.ReadSubExpr()); + C->setThreadLimit(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } void OMPClauseReader::VisitOMPPriorityClause(OMPPriorityClause *C) { - C->setPriority(Reader->Record.ReadSubExpr()); + C->setPriority(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } void OMPClauseReader::VisitOMPGrainsizeClause(OMPGrainsizeClause *C) { - C->setGrainsize(Reader->Record.ReadSubExpr()); + C->setGrainsize(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } void OMPClauseReader::VisitOMPNumTasksClause(OMPNumTasksClause *C) { - C->setNumTasks(Reader->Record.ReadSubExpr()); + C->setNumTasks(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } void OMPClauseReader::VisitOMPHintClause(OMPHintClause *C) { - C->setHint(Reader->Record.ReadSubExpr()); + C->setHint(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); } @@ -2330,7 +2330,7 @@ VisitOMPClauseWithPreInit(C); C->setDistScheduleKind( static_cast(Reader->Record.readInt())); - C->setChunkSize(Reader->Record.ReadSubExpr()); + C->setChunkSize(Reader->Record.readSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation()); C->setDistScheduleKindLoc(Reader->ReadSourceLocation()); C->setCommaLoc(Reader->ReadSourceLocation()); @@ -2356,13 +2356,13 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); SmallVector Decls; Decls.reserve(UniqueDecls); for (unsigned i = 0; i < UniqueDecls; ++i) - Decls.push_back(Reader->Record.ReadDeclAs()); + Decls.push_back(Reader->Record.readDeclAs()); C->setUniqueDecls(Decls); SmallVector ListsPerDecl; @@ -2380,8 +2380,8 @@ SmallVector Components; Components.reserve(TotalComponents); for (unsigned i = 0; i < TotalComponents; ++i) { - Expr *AssociatedExpr = Reader->Record.ReadSubExpr(); - ValueDecl *AssociatedDecl = Reader->Record.ReadDeclAs(); + Expr *AssociatedExpr = Reader->Record.readSubExpr(); + ValueDecl *AssociatedDecl = Reader->Record.readDeclAs(); Components.push_back(OMPClauseMappableExprCommon::MappableComponent( AssociatedExpr, AssociatedDecl)); } @@ -2398,13 +2398,13 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); SmallVector Decls; Decls.reserve(UniqueDecls); for (unsigned i = 0; i < UniqueDecls; ++i) - Decls.push_back(Reader->Record.ReadDeclAs()); + Decls.push_back(Reader->Record.readDeclAs()); C->setUniqueDecls(Decls); SmallVector ListsPerDecl; @@ -2422,8 +2422,8 @@ SmallVector Components; Components.reserve(TotalComponents); for (unsigned i = 0; i < TotalComponents; ++i) { - Expr *AssociatedExpr = Reader->Record.ReadSubExpr(); - ValueDecl *AssociatedDecl = Reader->Record.ReadDeclAs(); + Expr *AssociatedExpr = Reader->Record.readSubExpr(); + ValueDecl *AssociatedDecl = Reader->Record.readDeclAs(); Components.push_back(OMPClauseMappableExprCommon::MappableComponent( AssociatedExpr, AssociatedDecl)); } @@ -2440,21 +2440,21 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setPrivateCopies(Vars); Vars.clear(); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setInits(Vars); SmallVector Decls; Decls.reserve(UniqueDecls); for (unsigned i = 0; i < UniqueDecls; ++i) - Decls.push_back(Reader->Record.ReadDeclAs()); + Decls.push_back(Reader->Record.readDeclAs()); C->setUniqueDecls(Decls); SmallVector ListsPerDecl; @@ -2472,8 +2472,8 @@ SmallVector Components; Components.reserve(TotalComponents); for (unsigned i = 0; i < TotalComponents; ++i) { - Expr *AssociatedExpr = Reader->Record.ReadSubExpr(); - ValueDecl *AssociatedDecl = Reader->Record.ReadDeclAs(); + Expr *AssociatedExpr = Reader->Record.readSubExpr(); + ValueDecl *AssociatedDecl = Reader->Record.readDeclAs(); Components.push_back(OMPClauseMappableExprCommon::MappableComponent( AssociatedExpr, AssociatedDecl)); } @@ -2490,14 +2490,14 @@ SmallVector Vars; Vars.reserve(NumVars); for (unsigned i = 0; i != NumVars; ++i) - Vars.push_back(Reader->Record.ReadSubExpr()); + Vars.push_back(Reader->Record.readSubExpr()); C->setVarRefs(Vars); Vars.clear(); SmallVector Decls; Decls.reserve(UniqueDecls); for (unsigned i = 0; i < UniqueDecls; ++i) - Decls.push_back(Reader->Record.ReadDeclAs()); + Decls.push_back(Reader->Record.readDeclAs()); C->setUniqueDecls(Decls); SmallVector ListsPerDecl; @@ -2515,8 +2515,8 @@ SmallVector Components; Components.reserve(TotalComponents); for (unsigned i = 0; i < TotalComponents; ++i) { - Expr *AssociatedExpr = Reader->Record.ReadSubExpr(); - ValueDecl *AssociatedDecl = Reader->Record.ReadDeclAs(); + Expr *AssociatedExpr = Reader->Record.readSubExpr(); + ValueDecl *AssociatedDecl = Reader->Record.readDeclAs(); Components.push_back(OMPClauseMappableExprCommon::MappableComponent( AssociatedExpr, AssociatedDecl)); } @@ -2535,7 +2535,7 @@ Clauses.push_back(ClauseReader.readClause()); E->setClauses(Clauses); if (E->hasAssociatedStmt()) - E->setAssociatedStmt(Record.ReadSubStmt()); + E->setAssociatedStmt(Record.readSubStmt()); } void ASTStmtReader::VisitOMPLoopDirective(OMPLoopDirective *D) { @@ -2543,51 +2543,51 @@ // Two fields (NumClauses and CollapsedNum) were read in ReadStmtFromStream. Record.skipInts(2); VisitOMPExecutableDirective(D); - D->setIterationVariable(Record.ReadSubExpr()); - D->setLastIteration(Record.ReadSubExpr()); - D->setCalcLastIteration(Record.ReadSubExpr()); - D->setPreCond(Record.ReadSubExpr()); - D->setCond(Record.ReadSubExpr()); - D->setInit(Record.ReadSubExpr()); - D->setInc(Record.ReadSubExpr()); - D->setPreInits(Record.ReadSubStmt()); + D->setIterationVariable(Record.readSubExpr()); + D->setLastIteration(Record.readSubExpr()); + D->setCalcLastIteration(Record.readSubExpr()); + D->setPreCond(Record.readSubExpr()); + D->setCond(Record.readSubExpr()); + D->setInit(Record.readSubExpr()); + D->setInc(Record.readSubExpr()); + D->setPreInits(Record.readSubStmt()); if (isOpenMPWorksharingDirective(D->getDirectiveKind()) || isOpenMPTaskLoopDirective(D->getDirectiveKind()) || isOpenMPDistributeDirective(D->getDirectiveKind())) { - D->setIsLastIterVariable(Record.ReadSubExpr()); - D->setLowerBoundVariable(Record.ReadSubExpr()); - D->setUpperBoundVariable(Record.ReadSubExpr()); - D->setStrideVariable(Record.ReadSubExpr()); - D->setEnsureUpperBound(Record.ReadSubExpr()); - D->setNextLowerBound(Record.ReadSubExpr()); - D->setNextUpperBound(Record.ReadSubExpr()); - D->setNumIterations(Record.ReadSubExpr()); + D->setIsLastIterVariable(Record.readSubExpr()); + D->setLowerBoundVariable(Record.readSubExpr()); + D->setUpperBoundVariable(Record.readSubExpr()); + D->setStrideVariable(Record.readSubExpr()); + D->setEnsureUpperBound(Record.readSubExpr()); + D->setNextLowerBound(Record.readSubExpr()); + D->setNextUpperBound(Record.readSubExpr()); + D->setNumIterations(Record.readSubExpr()); } if (isOpenMPLoopBoundSharingDirective(D->getDirectiveKind())) { - D->setPrevLowerBoundVariable(Record.ReadSubExpr()); - D->setPrevUpperBoundVariable(Record.ReadSubExpr()); + D->setPrevLowerBoundVariable(Record.readSubExpr()); + D->setPrevUpperBoundVariable(Record.readSubExpr()); } SmallVector Sub; unsigned CollapsedNum = D->getCollapsedNumber(); Sub.reserve(CollapsedNum); for (unsigned i = 0; i < CollapsedNum; ++i) - Sub.push_back(Record.ReadSubExpr()); + Sub.push_back(Record.readSubExpr()); D->setCounters(Sub); Sub.clear(); for (unsigned i = 0; i < CollapsedNum; ++i) - Sub.push_back(Record.ReadSubExpr()); + Sub.push_back(Record.readSubExpr()); D->setPrivateCounters(Sub); Sub.clear(); for (unsigned i = 0; i < CollapsedNum; ++i) - Sub.push_back(Record.ReadSubExpr()); + Sub.push_back(Record.readSubExpr()); D->setInits(Sub); Sub.clear(); for (unsigned i = 0; i < CollapsedNum; ++i) - Sub.push_back(Record.ReadSubExpr()); + Sub.push_back(Record.readSubExpr()); D->setUpdates(Sub); Sub.clear(); for (unsigned i = 0; i < CollapsedNum; ++i) - Sub.push_back(Record.ReadSubExpr()); + Sub.push_back(Record.readSubExpr()); D->setFinals(Sub); } @@ -2712,10 +2712,10 @@ // The NumClauses field was read in ReadStmtFromStream. Record.skipInts(1); VisitOMPExecutableDirective(D); - D->setX(Record.ReadSubExpr()); - D->setV(Record.ReadSubExpr()); - D->setExpr(Record.ReadSubExpr()); - D->setUpdateExpr(Record.ReadSubExpr()); + D->setX(Record.readSubExpr()); + D->setV(Record.readSubExpr()); + D->setExpr(Record.readSubExpr()); + D->setUpdateExpr(Record.readSubExpr()); D->IsXLHSInRHSPart = Record.readInt() != 0; D->IsPostfixUpdate = Record.readInt() != 0; } @@ -3094,24 +3094,24 @@ assert(Record.getIdx() == 0); NestedNameSpecifierLoc QualifierLoc; if (Record.readInt()) { // HasQualifier. - QualifierLoc = Record.ReadNestedNameSpecifierLoc(); + QualifierLoc = Record.readNestedNameSpecifierLoc(); } SourceLocation TemplateKWLoc; TemplateArgumentListInfo ArgInfo; bool HasTemplateKWAndArgsInfo = Record.readInt(); if (HasTemplateKWAndArgsInfo) { - TemplateKWLoc = Record.ReadSourceLocation(); + TemplateKWLoc = Record.readSourceLocation(); unsigned NumTemplateArgs = Record.readInt(); - ArgInfo.setLAngleLoc(Record.ReadSourceLocation()); - ArgInfo.setRAngleLoc(Record.ReadSourceLocation()); + ArgInfo.setLAngleLoc(Record.readSourceLocation()); + ArgInfo.setRAngleLoc(Record.readSourceLocation()); for (unsigned i = 0; i != NumTemplateArgs; ++i) - ArgInfo.addArgument(Record.ReadTemplateArgumentLoc()); + ArgInfo.addArgument(Record.readTemplateArgumentLoc()); } bool HadMultipleCandidates = Record.readInt(); - NamedDecl *FoundD = Record.ReadDeclAs(); + NamedDecl *FoundD = Record.readDeclAs(); AccessSpecifier AS = (AccessSpecifier)Record.readInt(); DeclAccessPair FoundDecl = DeclAccessPair::make(FoundD, AS); @@ -3119,17 +3119,17 @@ ExprValueKind VK = static_cast(Record.readInt()); ExprObjectKind OK = static_cast(Record.readInt()); Expr *Base = ReadSubExpr(); - ValueDecl *MemberD = Record.ReadDeclAs(); - SourceLocation MemberLoc = Record.ReadSourceLocation(); + ValueDecl *MemberD = Record.readDeclAs(); + SourceLocation MemberLoc = Record.readSourceLocation(); DeclarationNameInfo MemberNameInfo(MemberD->getDeclName(), MemberLoc); bool IsArrow = Record.readInt(); - SourceLocation OperatorLoc = Record.ReadSourceLocation(); + SourceLocation OperatorLoc = Record.readSourceLocation(); S = MemberExpr::Create(Context, Base, IsArrow, OperatorLoc, QualifierLoc, TemplateKWLoc, MemberD, FoundDecl, MemberNameInfo, HasTemplateKWAndArgsInfo ? &ArgInfo : nullptr, T, VK, OK); - Record.ReadDeclarationNameLoc(cast(S)->MemberDNLoc, + Record.readDeclarationNameLoc(cast(S)->MemberDNLoc, MemberD->getDeclName()); if (HadMultipleCandidates) cast(S)->setHadMultipleCandidates(true);