summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-10-12 23:29:02 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-10-12 23:29:02 +0000
commit88d10b68e0975510477d87e585c020a929739778 (patch)
treec56bd85a61a3b1e1dca2ba7cf5cda6882d290f55 /clang/lib/Serialization/ASTReaderDecl.cpp
parentd9fa56a4fb24c4763adf2ea4e16b04a4f43e3e08 (diff)
downloadbcm5719-llvm-88d10b68e0975510477d87e585c020a929739778.tar.gz
bcm5719-llvm-88d10b68e0975510477d87e585c020a929739778.zip
Revert r284008. This is us to fail to instantiate static data members in some
cases. I'm working on reducing a testcase. llvm-svn: 284081
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTReaderDecl.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index cd232251e23..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,29 +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() ||
- CurD->isThisDeclarationADefinition()) {
- VD->demoteThisDefinitionToDeclaration();
- break;
- }
- }
- }
-}
-
-template<>
-void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader,
Redeclarable<FunctionDecl> *D,
Decl *Previous, Decl *Canon) {
FunctionDecl *FD = static_cast<FunctionDecl*>(D);
OpenPOWER on IntegriCloud