forked from OSchip/llvm-project
Eliminate all but one caller of Decl::getPCHLevel()
llvm-svn: 139430
This commit is contained in:
parent
93cd31869b
commit
dd57400c06
|
@ -3140,8 +3140,6 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls,
|
|||
for (FirstLatestDeclMap::iterator I = FirstLatestDecls.begin(),
|
||||
E = FirstLatestDecls.end();
|
||||
I != E; ++I) {
|
||||
assert(I->first->getPCHLevel() > I->second->getPCHLevel() &&
|
||||
"Expected first & second to be in different PCHs");
|
||||
AddDeclRef(I->first, FirstLatestDeclIDs);
|
||||
AddDeclRef(I->second, FirstLatestDeclIDs);
|
||||
}
|
||||
|
|
|
@ -1021,7 +1021,7 @@ void ASTDeclWriter::VisitRedeclarableTemplateDecl(RedeclarableTemplateDecl *D) {
|
|||
// in a chained PCH, keep track of the association with the map so we can
|
||||
// update the first decl during AST reading.
|
||||
if (First->getMostRecentDeclaration() == D &&
|
||||
First->getPCHLevel() > D->getPCHLevel()) {
|
||||
First->isFromASTFile() && !D->isFromASTFile()) {
|
||||
assert(Writer.FirstLatestDecls.find(First)==Writer.FirstLatestDecls.end()
|
||||
&& "The latest is already set");
|
||||
Writer.FirstLatestDecls[First] = D;
|
||||
|
@ -1243,7 +1243,7 @@ void ASTDeclWriter::VisitRedeclarable(Redeclarable<T> *D) {
|
|||
// in a chained PCH, keep track of the association with the map so we can
|
||||
// update the first decl during AST reading.
|
||||
if (ThisDecl != First && First->getMostRecentDeclaration() == ThisDecl &&
|
||||
First->getPCHLevel() > ThisDecl->getPCHLevel()) {
|
||||
First->isFromASTFile() && !ThisDecl->isFromASTFile()) {
|
||||
assert(Writer.FirstLatestDecls.find(First) == Writer.FirstLatestDecls.end()
|
||||
&& "The latest is already set");
|
||||
Writer.FirstLatestDecls[First] = ThisDecl;
|
||||
|
|
Loading…
Reference in New Issue