Eliminate "rewritten decls" from the AST writer. NFC

llvm-svn: 251877
This commit is contained in:
Douglas Gregor
2015-11-03 01:20:54 +00:00
parent cc86d824d5
commit 7dd37e52b1
3 changed files with 10 additions and 35 deletions

View File

@@ -2093,16 +2093,12 @@ void ASTWriter::WriteDecl(ASTContext &Context, Decl *D) {
// Determine the ID for this declaration.
serialization::DeclID ID;
if (D->isFromASTFile()) {
assert(isRewritten(D) && "should not be emitting imported decl");
ID = getDeclID(D);
} else {
serialization::DeclID &IDR = DeclIDs[D];
if (IDR == 0)
IDR = NextDeclID++;
assert(!D->isFromASTFile() && "should not be emitting imported decl");
serialization::DeclID &IDR = DeclIDs[D];
if (IDR == 0)
IDR = NextDeclID++;
ID = IDR;
}
ID = IDR;
bool isReplacingADecl = ID < FirstDeclID;