diff options
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index 864eaf02b02..19113da7e3c 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -1216,7 +1216,6 @@ ASTDeclReader::RedeclarableResult ASTDeclReader::VisitVarDeclImpl(VarDecl *VD) { VD->VarDeclBits.TSCSpec = Record[Idx++]; VD->VarDeclBits.InitStyle = Record[Idx++]; if (!isa<ParmVarDecl>(VD)) { - VD->NonParmVarDeclBits.IsThisDeclarationADemotedDefinition = Record[Idx++]; VD->NonParmVarDeclBits.ExceptionVar = Record[Idx++]; VD->NonParmVarDeclBits.NRVOVariable = Record[Idx++]; VD->NonParmVarDeclBits.CXXForRangeDecl = Record[Idx++]; @@ -3070,34 +3069,6 @@ void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, namespace clang { template<> void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, - Redeclarable<VarDecl> *D, - Decl *Previous, Decl *Canon) { - VarDecl *VD = static_cast<VarDecl*>(D); - VarDecl *PrevVD = cast<VarDecl>(Previous); - D->RedeclLink.setPrevious(PrevVD); - D->First = PrevVD->First; - - - // We should keep at most one definition on the chain. - if (VD->isThisDeclarationADefinition()) { - for (VarDecl *CurD = PrevVD; CurD; CurD = CurD->getPreviousDecl()) { - // If we find an already demoted definition, this we already visited this - // part of the chain. Reduces the loop from quadratic-time to linear-time. - if (CurD->isThisDeclarationADemotedDefinition()) { - VD->demoteThisDefinitionToDeclaration(); - break; - } - if (CurD->isThisDeclarationADefinition()) { - // If we found another definition on the chain, demote the current one. - VD->demoteThisDefinitionToDeclaration(); - break; - } - } - } -} - -template<> -void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, Redeclarable<FunctionDecl> *D, Decl *Previous, Decl *Canon) { FunctionDecl *FD = static_cast<FunctionDecl*>(D); |