diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-07-15 21:33:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-07-15 21:33:46 +0000 |
commit | 13fb860c7847d371a6b18dc38e805366bc582e24 (patch) | |
tree | b3aa960dc285985f11222a29a64a3b8a50e98150 /clang/lib/Serialization/ASTReaderDecl.cpp | |
parent | c7536a5d60aa1568b0014dc9da3214d62b26e808 (diff) | |
download | bcm5719-llvm-13fb860c7847d371a6b18dc38e805366bc582e24.tar.gz bcm5719-llvm-13fb860c7847d371a6b18dc38e805366bc582e24.zip |
Revert r275481, r275490. This broke modules bootstrap.
llvm-svn: 275624
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index d9ed39a501b..4fd7aeb83ac 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -3462,13 +3462,6 @@ Decl *ASTReader::ReadDeclRecord(DeclID ID) { } assert(Idx == Record.size()); - // If we have deserialized a declaration that has a definition the - // AST consumer might need to know about, queue it. - // We don't pass it to the consumer immediately because we may be in recursive - // loading, and some declarations may still be initializing. - if (isConsumerInterestedIn(D, Reader.hasPendingBody())) - addInterestingDecl(D); - // Load any relevant update records. PendingUpdateRecords.push_back(std::make_pair(ID, D)); @@ -3477,6 +3470,13 @@ Decl *ASTReader::ReadDeclRecord(DeclID ID) { if (Class->isThisDeclarationADefinition()) loadObjCCategories(ID, Class); + // If we have deserialized a declaration that has a definition the + // AST consumer might need to know about, queue it. + // We don't pass it to the consumer immediately because we may be in recursive + // loading, and some declarations may still be initializing. + if (isConsumerInterestedIn(D, Reader.hasPendingBody())) + InterestingDecls.push_back(D); + return D; } @@ -3511,7 +3511,7 @@ void ASTReader::loadDeclUpdateRecords(serialization::DeclID ID, Decl *D) { // we need to hand it off to the consumer. if (!WasInteresting && isConsumerInterestedIn(D, Reader.hasPendingBody())) { - addInterestingDecl(D); + InterestingDecls.push_back(D); WasInteresting = true; } } @@ -3945,7 +3945,6 @@ void ASTDeclReader::UpdateDecl(Decl *D, ModuleFile &ModuleFile, // The declaration is now visible. Exported->Hidden = false; } - Reader.addInterestingDecl(Exported, Owner); break; } |