Eliminate all but one caller of Decl::getPCHLevel()

llvm-svn: 139430
This commit is contained in:
Douglas Gregor 2011-09-09 23:07:59 +00:00
parent 93cd31869b
commit dd57400c06
2 changed files with 2 additions and 4 deletions

View File

@ -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);
}

View File

@ -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;