diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/DeclarationName.cpp | 296 | ||||
-rw-r--r-- | clang/lib/Basic/IdentifierTable.cpp | 29 | ||||
-rw-r--r-- | clang/lib/Sema/IdentifierResolver.cpp | 14 | ||||
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 2 |
5 files changed, 121 insertions, 222 deletions
diff --git a/clang/lib/AST/DeclarationName.cpp b/clang/lib/AST/DeclarationName.cpp index 84343410705..f2c152f918e 100644 --- a/clang/lib/AST/DeclarationName.cpp +++ b/clang/lib/AST/DeclarationName.cpp @@ -49,10 +49,12 @@ int DeclarationName::compare(DeclarationName LHS, DeclarationName RHS) { switch (LHS.getNameKind()) { case DeclarationName::Identifier: { - IdentifierInfo *LII = LHS.getAsIdentifierInfo(); - IdentifierInfo *RII = RHS.getAsIdentifierInfo(); - if (!LII) return RII ? -1 : 0; - if (!RII) return 1; + IdentifierInfo *LII = LHS.castAsIdentifierInfo(); + IdentifierInfo *RII = RHS.castAsIdentifierInfo(); + if (!LII) + return RII ? -1 : 0; + if (!RII) + return 1; return LII->getName().compare(RII->getName()); } @@ -66,15 +68,18 @@ int DeclarationName::compare(DeclarationName LHS, DeclarationName RHS) { if (LHS.getNameKind() == DeclarationName::ObjCZeroArgSelector && RHS.getNameKind() == DeclarationName::ObjCZeroArgSelector) { return LHSSelector.getAsIdentifierInfo()->getName().compare( - RHSSelector.getAsIdentifierInfo()->getName()); + RHSSelector.getAsIdentifierInfo()->getName()); } unsigned LN = LHSSelector.getNumArgs(), RN = RHSSelector.getNumArgs(); for (unsigned I = 0, N = std::min(LN, RN); I != N; ++I) { switch (LHSSelector.getNameForSlot(I).compare( - RHSSelector.getNameForSlot(I))) { - case -1: return -1; - case 1: return 1; - default: break; + RHSSelector.getNameForSlot(I))) { + case -1: + return -1; + case 1: + return 1; + default: + break; } } @@ -102,7 +107,7 @@ int DeclarationName::compare(DeclarationName LHS, DeclarationName RHS) { case DeclarationName::CXXLiteralOperatorName: return LHS.getCXXLiteralIdentifier()->getName().compare( - RHS.getCXXLiteralIdentifier()->getName()); + RHS.getCXXLiteralIdentifier()->getName()); case DeclarationName::CXXUsingDirective: return 0; @@ -131,25 +136,24 @@ static void printCXXConstructorDestructorName(QualType ClassType, } void DeclarationName::print(raw_ostream &OS, const PrintingPolicy &Policy) { - DeclarationName &N = *this; - switch (N.getNameKind()) { + switch (getNameKind()) { case DeclarationName::Identifier: - if (const IdentifierInfo *II = N.getAsIdentifierInfo()) + if (const IdentifierInfo *II = getAsIdentifierInfo()) OS << II->getName(); return; case DeclarationName::ObjCZeroArgSelector: case DeclarationName::ObjCOneArgSelector: case DeclarationName::ObjCMultiArgSelector: - N.getObjCSelector().print(OS); + getObjCSelector().print(OS); return; case DeclarationName::CXXConstructorName: - return printCXXConstructorDestructorName(N.getCXXNameType(), OS, Policy); + return printCXXConstructorDestructorName(getCXXNameType(), OS, Policy); case DeclarationName::CXXDestructorName: OS << '~'; - return printCXXConstructorDestructorName(N.getCXXNameType(), OS, Policy); + return printCXXConstructorDestructorName(getCXXNameType(), OS, Policy); case DeclarationName::CXXDeductionGuideName: OS << "<deduction guide for "; @@ -158,13 +162,13 @@ void DeclarationName::print(raw_ostream &OS, const PrintingPolicy &Policy) { return; case DeclarationName::CXXOperatorName: { - static const char* const OperatorNames[NUM_OVERLOADED_OPERATORS] = { - nullptr, -#define OVERLOADED_OPERATOR(Name,Spelling,Token,Unary,Binary,MemberOnly) \ - Spelling, + static const char *const OperatorNames[NUM_OVERLOADED_OPERATORS] = { + nullptr, +#define OVERLOADED_OPERATOR(Name, Spelling, Token, Unary, Binary, MemberOnly) \ + Spelling, #include "clang/Basic/OperatorKinds.def" }; - const char *OpName = OperatorNames[N.getCXXOverloadedOperator()]; + const char *OpName = OperatorNames[getCXXOverloadedOperator()]; assert(OpName && "not an overloaded operator"); OS << "operator"; @@ -175,12 +179,12 @@ void DeclarationName::print(raw_ostream &OS, const PrintingPolicy &Policy) { } case DeclarationName::CXXLiteralOperatorName: - OS << "operator\"\"" << N.getCXXLiteralIdentifier()->getName(); + OS << "operator\"\"" << getCXXLiteralIdentifier()->getName(); return; case DeclarationName::CXXConversionFunctionName: { OS << "operator "; - QualType Type = N.getCXXNameType(); + QualType Type = getCXXNameType(); if (const RecordType *Rec = Type->getAs<RecordType>()) { OS << *Rec->getDecl(); return; @@ -209,46 +213,6 @@ raw_ostream &operator<<(raw_ostream &OS, DeclarationName N) { } // namespace clang -DeclarationName::NameKind DeclarationName::getNameKind() const { - switch (getStoredNameKind()) { - case StoredIdentifier: return Identifier; - case StoredObjCZeroArgSelector: return ObjCZeroArgSelector; - case StoredObjCOneArgSelector: return ObjCOneArgSelector; - - case StoredDeclarationNameExtra: - switch (getExtra()->ExtraKindOrNumArgs) { - case DeclarationNameExtra::CXXConstructor: - return CXXConstructorName; - - case DeclarationNameExtra::CXXDestructor: - return CXXDestructorName; - - case DeclarationNameExtra::CXXDeductionGuide: - return CXXDeductionGuideName; - - case DeclarationNameExtra::CXXConversionFunction: - return CXXConversionFunctionName; - - case DeclarationNameExtra::CXXLiteralOperator: - return CXXLiteralOperatorName; - - case DeclarationNameExtra::CXXUsingDirective: - return CXXUsingDirective; - - default: - // Check if we have one of the CXXOperator* enumeration values. - if (getExtra()->ExtraKindOrNumArgs < - DeclarationNameExtra::CXXUsingDirective) - return CXXOperatorName; - - return ObjCMultiArgSelector; - } - } - - // Can't actually get here. - llvm_unreachable("This should be unreachable!"); -} - bool DeclarationName::isDependentName() const { QualType T = getCXXNameType(); if (!T.isNull() && T->isDependentType()) @@ -269,122 +233,56 @@ std::string DeclarationName::getAsString() const { return OS.str(); } -QualType DeclarationName::getCXXNameType() const { - if (CXXSpecialName *CXXName = getAsCXXSpecialName()) - return CXXName->Type; - else - return QualType(); -} - -TemplateDecl *DeclarationName::getCXXDeductionGuideTemplate() const { - if (auto *Guide = getAsCXXDeductionGuideNameExtra()) - return Guide->Template; - return nullptr; -} - -OverloadedOperatorKind DeclarationName::getCXXOverloadedOperator() const { - if (CXXOperatorIdName *CXXOp = getAsCXXOperatorIdName()) { - unsigned value - = CXXOp->ExtraKindOrNumArgs - DeclarationNameExtra::CXXConversionFunction; - return static_cast<OverloadedOperatorKind>(value); - } else { - return OO_None; - } -} - -IdentifierInfo *DeclarationName::getCXXLiteralIdentifier() const { - if (CXXLiteralOperatorIdName *CXXLit = getAsCXXLiteralOperatorIdName()) - return CXXLit->ID; - else - return nullptr; -} - -void *DeclarationName::getFETokenInfoAsVoidSlow() const { +void *DeclarationName::getFETokenInfoSlow() const { switch (getNameKind()) { case Identifier: - llvm_unreachable("Handled by getFETokenInfo()"); - + llvm_unreachable("case Identifier already handled by getFETokenInfo!"); case CXXConstructorName: case CXXDestructorName: case CXXConversionFunctionName: - return getAsCXXSpecialName()->FETokenInfo; - - case CXXDeductionGuideName: - return getAsCXXDeductionGuideNameExtra()->FETokenInfo; - + return castAsCXXSpecialNameExtra()->FETokenInfo; case CXXOperatorName: - return getAsCXXOperatorIdName()->FETokenInfo; - + return castAsCXXOperatorIdName()->FETokenInfo; + case CXXDeductionGuideName: + return castAsCXXDeductionGuideNameExtra()->FETokenInfo; case CXXLiteralOperatorName: - return getAsCXXLiteralOperatorIdName()->FETokenInfo; - + return castAsCXXLiteralOperatorIdName()->FETokenInfo; default: - llvm_unreachable("Declaration name has no FETokenInfo"); + llvm_unreachable("DeclarationName has no FETokenInfo!"); } } -void DeclarationName::setFETokenInfo(void *T) { +void DeclarationName::setFETokenInfoSlow(void *T) { switch (getNameKind()) { case Identifier: - getAsIdentifierInfo()->setFETokenInfo(T); - break; - + llvm_unreachable("case Identifier already handled by setFETokenInfo!"); case CXXConstructorName: case CXXDestructorName: case CXXConversionFunctionName: - getAsCXXSpecialName()->FETokenInfo = T; + castAsCXXSpecialNameExtra()->FETokenInfo = T; break; - - case CXXDeductionGuideName: - getAsCXXDeductionGuideNameExtra()->FETokenInfo = T; - break; - case CXXOperatorName: - getAsCXXOperatorIdName()->FETokenInfo = T; + castAsCXXOperatorIdName()->FETokenInfo = T; + break; + case CXXDeductionGuideName: + castAsCXXDeductionGuideNameExtra()->FETokenInfo = T; break; - case CXXLiteralOperatorName: - getAsCXXLiteralOperatorIdName()->FETokenInfo = T; + castAsCXXLiteralOperatorIdName()->FETokenInfo = T; break; - default: - llvm_unreachable("Declaration name has no FETokenInfo"); + llvm_unreachable("DeclarationName has no FETokenInfo!"); } } -DeclarationName DeclarationName::getUsingDirectiveName() { - // Single instance of DeclarationNameExtra for using-directive - static const DeclarationNameExtra UDirExtra = - { DeclarationNameExtra::CXXUsingDirective }; - - uintptr_t Ptr = reinterpret_cast<uintptr_t>(&UDirExtra); - Ptr |= StoredDeclarationNameExtra; - - return DeclarationName(Ptr); -} - LLVM_DUMP_METHOD void DeclarationName::dump() const { llvm::errs() << *this << '\n'; } DeclarationNameTable::DeclarationNameTable(const ASTContext &C) : Ctx(C) { // Initialize the overloaded operator names. - CXXOperatorNames = new (Ctx) CXXOperatorIdName[NUM_OVERLOADED_OPERATORS]; - for (unsigned Op = 0; Op < NUM_OVERLOADED_OPERATORS; ++Op) { - CXXOperatorNames[Op].ExtraKindOrNumArgs - = Op + DeclarationNameExtra::CXXConversionFunction; - CXXOperatorNames[Op].FETokenInfo = nullptr; - } -} - -DeclarationName DeclarationNameTable::getCXXConstructorName(CanQualType Ty) { - return getCXXSpecialName(DeclarationName::CXXConstructorName, - Ty.getUnqualifiedType()); -} - -DeclarationName DeclarationNameTable::getCXXDestructorName(CanQualType Ty) { - return getCXXSpecialName(DeclarationName::CXXDestructorName, - Ty.getUnqualifiedType()); + for (unsigned Op = 0; Op < NUM_OVERLOADED_OPERATORS; ++Op) + CXXOperatorNames[Op].Kind = static_cast<OverloadedOperatorKind>(Op); } DeclarationName @@ -398,65 +296,72 @@ DeclarationNameTable::getCXXDeductionGuideName(TemplateDecl *Template) { if (auto *Name = CXXDeductionGuideNames.FindNodeOrInsertPos(ID, InsertPos)) return DeclarationName(Name); - auto *Name = new (Ctx) CXXDeductionGuideNameExtra; - Name->ExtraKindOrNumArgs = DeclarationNameExtra::CXXDeductionGuide; - Name->Template = Template; - Name->FETokenInfo = nullptr; - + auto *Name = new (Ctx) detail::CXXDeductionGuideNameExtra(Template); CXXDeductionGuideNames.InsertNode(Name, InsertPos); return DeclarationName(Name); } +DeclarationName DeclarationNameTable::getCXXConstructorName(CanQualType Ty) { + // The type of constructors is unqualified. + Ty = Ty.getUnqualifiedType(); + // Do we already have this C++ constructor name ? + llvm::FoldingSetNodeID ID; + ID.AddPointer(Ty.getAsOpaquePtr()); + void *InsertPos = nullptr; + if (auto *Name = CXXConstructorNames.FindNodeOrInsertPos(ID, InsertPos)) + return {Name, DeclarationName::StoredCXXConstructorName}; + + // We have to create it. + auto *SpecialName = new (Ctx) detail::CXXSpecialNameExtra(Ty); + CXXConstructorNames.InsertNode(SpecialName, InsertPos); + return {SpecialName, DeclarationName::StoredCXXConstructorName}; +} + +DeclarationName DeclarationNameTable::getCXXDestructorName(CanQualType Ty) { + // The type of destructors is unqualified. + Ty = Ty.getUnqualifiedType(); + // Do we already have this C++ destructor name ? + llvm::FoldingSetNodeID ID; + ID.AddPointer(Ty.getAsOpaquePtr()); + void *InsertPos = nullptr; + if (auto *Name = CXXDestructorNames.FindNodeOrInsertPos(ID, InsertPos)) + return {Name, DeclarationName::StoredCXXDestructorName}; + + // We have to create it. + auto *SpecialName = new (Ctx) detail::CXXSpecialNameExtra(Ty); + CXXDestructorNames.InsertNode(SpecialName, InsertPos); + return {SpecialName, DeclarationName::StoredCXXDestructorName}; +} + DeclarationName DeclarationNameTable::getCXXConversionFunctionName(CanQualType Ty) { - return getCXXSpecialName(DeclarationName::CXXConversionFunctionName, Ty); + // Do we already have this C++ conversion function name ? + llvm::FoldingSetNodeID ID; + ID.AddPointer(Ty.getAsOpaquePtr()); + void *InsertPos = nullptr; + if (auto *Name = + CXXConversionFunctionNames.FindNodeOrInsertPos(ID, InsertPos)) + return {Name, DeclarationName::StoredCXXConversionFunctionName}; + + // We have to create it. + auto *SpecialName = new (Ctx) detail::CXXSpecialNameExtra(Ty); + CXXConversionFunctionNames.InsertNode(SpecialName, InsertPos); + return {SpecialName, DeclarationName::StoredCXXConversionFunctionName}; } DeclarationName DeclarationNameTable::getCXXSpecialName(DeclarationName::NameKind Kind, CanQualType Ty) { - assert(Kind >= DeclarationName::CXXConstructorName && - Kind <= DeclarationName::CXXConversionFunctionName && - "Kind must be a C++ special name kind"); - - DeclarationNameExtra::ExtraKind EKind; switch (Kind) { case DeclarationName::CXXConstructorName: - EKind = DeclarationNameExtra::CXXConstructor; - assert(!Ty.hasQualifiers() &&"Constructor type must be unqualified"); - break; + return getCXXConstructorName(Ty); case DeclarationName::CXXDestructorName: - EKind = DeclarationNameExtra::CXXDestructor; - assert(!Ty.hasQualifiers() && "Destructor type must be unqualified"); - break; + return getCXXDestructorName(Ty); case DeclarationName::CXXConversionFunctionName: - EKind = DeclarationNameExtra::CXXConversionFunction; - break; + return getCXXConversionFunctionName(Ty); default: - return DeclarationName(); + llvm_unreachable("Invalid kind in getCXXSpecialName!"); } - - // Unique selector, to guarantee there is one per name. - llvm::FoldingSetNodeID ID; - ID.AddInteger(EKind); - ID.AddPointer(Ty.getAsOpaquePtr()); - - void *InsertPos = nullptr; - if (CXXSpecialName *Name = CXXSpecialNames.FindNodeOrInsertPos(ID, InsertPos)) - return DeclarationName(Name); - - CXXSpecialName *SpecialName = new (Ctx) CXXSpecialName; - SpecialName->ExtraKindOrNumArgs = EKind; - SpecialName->Type = Ty; - SpecialName->FETokenInfo = nullptr; - - CXXSpecialNames.InsertNode(SpecialName, InsertPos); - return DeclarationName(SpecialName); -} - -DeclarationName -DeclarationNameTable::getCXXOperatorName(OverloadedOperatorKind Op) { - return DeclarationName(&CXXOperatorNames[(unsigned)Op]); } DeclarationName @@ -465,15 +370,10 @@ DeclarationNameTable::getCXXLiteralOperatorName(IdentifierInfo *II) { ID.AddPointer(II); void *InsertPos = nullptr; - if (CXXLiteralOperatorIdName *Name = - CXXLiteralOperatorNames.FindNodeOrInsertPos(ID, InsertPos)) - return DeclarationName (Name); - - CXXLiteralOperatorIdName *LiteralName = new (Ctx) CXXLiteralOperatorIdName; - LiteralName->ExtraKindOrNumArgs = DeclarationNameExtra::CXXLiteralOperator; - LiteralName->ID = II; - LiteralName->FETokenInfo = nullptr; + if (auto *Name = CXXLiteralOperatorNames.FindNodeOrInsertPos(ID, InsertPos)) + return DeclarationName(Name); + auto *LiteralName = new (Ctx) detail::CXXLiteralOperatorIdName(II); CXXLiteralOperatorNames.InsertNode(LiteralName, InsertPos); return DeclarationName(LiteralName); } diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index 7ec3cb7dd65..147f3e04751 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/lib/Basic/IdentifierTable.cpp @@ -382,24 +382,23 @@ unsigned llvm::DenseMapInfo<clang::Selector>::getHashValue(clang::Selector S) { namespace clang { -/// MultiKeywordSelector - One of these variable length records is kept for each +/// One of these variable length records is kept for each /// selector containing more than one keyword. We use a folding set /// to unique aggregate names (keyword selectors in ObjC parlance). Access to /// this class is provided strictly through Selector. -class MultiKeywordSelector - : public DeclarationNameExtra, public llvm::FoldingSetNode { - MultiKeywordSelector(unsigned nKeys) { - ExtraKindOrNumArgs = NUM_EXTRA_KINDS + nKeys; - } +class alignas(IdentifierInfoAlignment) MultiKeywordSelector + : public detail::DeclarationNameExtra, + public llvm::FoldingSetNode { + MultiKeywordSelector(unsigned nKeys) : DeclarationNameExtra(nKeys) {} public: // Constructor for keyword selectors. - MultiKeywordSelector(unsigned nKeys, IdentifierInfo **IIV) { + MultiKeywordSelector(unsigned nKeys, IdentifierInfo **IIV) + : DeclarationNameExtra(nKeys) { assert((nKeys > 1) && "not a multi-keyword selector"); - ExtraKindOrNumArgs = NUM_EXTRA_KINDS + nKeys; // Fill in the trailing keyword array. - IdentifierInfo **KeyInfo = reinterpret_cast<IdentifierInfo **>(this+1); + IdentifierInfo **KeyInfo = reinterpret_cast<IdentifierInfo **>(this + 1); for (unsigned i = 0; i != nKeys; ++i) KeyInfo[i] = IIV[i]; } @@ -407,16 +406,16 @@ public: // getName - Derive the full selector name and return it. std::string getName() const; - unsigned getNumArgs() const { return ExtraKindOrNumArgs - NUM_EXTRA_KINDS; } + using DeclarationNameExtra::getNumArgs; using keyword_iterator = IdentifierInfo *const *; keyword_iterator keyword_begin() const { - return reinterpret_cast<keyword_iterator>(this+1); + return reinterpret_cast<keyword_iterator>(this + 1); } keyword_iterator keyword_end() const { - return keyword_begin()+getNumArgs(); + return keyword_begin() + getNumArgs(); } IdentifierInfo *getIdentifierInfoForSlot(unsigned i) const { @@ -424,8 +423,8 @@ public: return keyword_begin()[i]; } - static void Profile(llvm::FoldingSetNodeID &ID, - keyword_iterator ArgTys, unsigned NumArgs) { + static void Profile(llvm::FoldingSetNodeID &ID, keyword_iterator ArgTys, + unsigned NumArgs) { ID.AddInteger(NumArgs); for (unsigned i = 0; i != NumArgs; ++i) ID.AddPointer(ArgTys[i]); @@ -462,7 +461,7 @@ IdentifierInfo *Selector::getIdentifierInfoForSlot(unsigned argIndex) const { StringRef Selector::getNameForSlot(unsigned int argIndex) const { IdentifierInfo *II = getIdentifierInfoForSlot(argIndex); - return II? II->getName() : StringRef(); + return II ? II->getName() : StringRef(); } std::string MultiKeywordSelector::getName() const { diff --git a/clang/lib/Sema/IdentifierResolver.cpp b/clang/lib/Sema/IdentifierResolver.cpp index dba56931d49..b439f725572 100644 --- a/clang/lib/Sema/IdentifierResolver.cpp +++ b/clang/lib/Sema/IdentifierResolver.cpp @@ -147,7 +147,7 @@ void IdentifierResolver::AddDecl(NamedDecl *D) { if (IdentifierInfo *II = Name.getAsIdentifierInfo()) updatingIdentifier(*II); - void *Ptr = Name.getFETokenInfo<void>(); + void *Ptr = Name.getFETokenInfo(); if (!Ptr) { Name.setFETokenInfo(D); @@ -172,7 +172,7 @@ void IdentifierResolver::InsertDeclAfter(iterator Pos, NamedDecl *D) { if (IdentifierInfo *II = Name.getAsIdentifierInfo()) updatingIdentifier(*II); - void *Ptr = Name.getFETokenInfo<void>(); + void *Ptr = Name.getFETokenInfo(); if (!Ptr) { AddDecl(D); @@ -213,7 +213,7 @@ void IdentifierResolver::RemoveDecl(NamedDecl *D) { if (IdentifierInfo *II = Name.getAsIdentifierInfo()) updatingIdentifier(*II); - void *Ptr = Name.getFETokenInfo<void>(); + void *Ptr = Name.getFETokenInfo(); assert(Ptr && "Didn't find this decl on its identifier's chain!"); @@ -232,7 +232,7 @@ IdentifierResolver::begin(DeclarationName Name) { if (IdentifierInfo *II = Name.getAsIdentifierInfo()) readingIdentifier(*II); - void *Ptr = Name.getFETokenInfo<void>(); + void *Ptr = Name.getFETokenInfo(); if (!Ptr) return end(); if (isDeclPtr(Ptr)) @@ -304,7 +304,7 @@ bool IdentifierResolver::tryAddTopLevelDecl(NamedDecl *D, DeclarationName Name){ if (IdentifierInfo *II = Name.getAsIdentifierInfo()) readingIdentifier(*II); - void *Ptr = Name.getFETokenInfo<void>(); + void *Ptr = Name.getFETokenInfo(); if (!Ptr) { Name.setFETokenInfo(D); @@ -397,7 +397,7 @@ void IdentifierResolver::updatingIdentifier(IdentifierInfo &II) { /// It creates a new IdDeclInfo if one was not created before for this id. IdentifierResolver::IdDeclInfo & IdentifierResolver::IdDeclInfoMap::operator[](DeclarationName Name) { - void *Ptr = Name.getFETokenInfo<void>(); + void *Ptr = Name.getFETokenInfo(); if (Ptr) return *toIdDeclInfo(Ptr); @@ -415,7 +415,7 @@ IdentifierResolver::IdDeclInfoMap::operator[](DeclarationName Name) { void IdentifierResolver::iterator::incrementSlowCase() { NamedDecl *D = **this; - void *InfoPtr = D->getDeclName().getFETokenInfo<void>(); + void *InfoPtr = D->getDeclName().getFETokenInfo(); assert(!isDeclPtr(InfoPtr) && "Decl with wrong id ?"); IdDeclInfo *Info = toIdDeclInfo(InfoPtr); diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index bb2076e25fd..c143cb03689 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -908,7 +908,7 @@ static bool isInterestingIdentifier(ASTReader &Reader, IdentifierInfo &II, (IsModule ? II.hasRevertedBuiltin() : II.getObjCOrBuiltinID()) || II.hasRevertedTokenIDToIdentifier() || (!(IsModule && Reader.getPreprocessor().getLangOpts().CPlusPlus) && - II.getFETokenInfo<void>()); + II.getFETokenInfo()); } static bool readBit(unsigned &Bits) { diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index c68f9abd47a..689aa8ff96d 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -3574,7 +3574,7 @@ class ASTIdentifierTableTrait { II->isPoisoned() || (IsModule ? II->hasRevertedBuiltin() : II->getObjCOrBuiltinID()) || II->hasRevertedTokenIDToIdentifier() || - (NeedDecls && II->getFETokenInfo<void>())) + (NeedDecls && II->getFETokenInfo())) return true; return false; |