diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-05 10:38:01 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-05 10:38:01 +0000 |
commit | a95d019150241633cafe63545597402d70b89bed (patch) | |
tree | 6ace7c0431d4fc55edc7271a3f1673ee4c74f91a /clang/lib/Frontend/PCHWriterDecl.cpp | |
parent | 927d8e06c1234d9ad2737fb1c8f4d91d72a3cdc3 (diff) | |
download | bcm5719-llvm-a95d019150241633cafe63545597402d70b89bed.tar.gz bcm5719-llvm-a95d019150241633cafe63545597402d70b89bed.zip |
Read/write the identifier namespace in PCH for decls that may modify it.
We can now use a PCH'ed <map>.
llvm-svn: 107617
Diffstat (limited to 'clang/lib/Frontend/PCHWriterDecl.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHWriterDecl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHWriterDecl.cpp b/clang/lib/Frontend/PCHWriterDecl.cpp index 9f7264ede18..983d6dbd773 100644 --- a/clang/lib/Frontend/PCHWriterDecl.cpp +++ b/clang/lib/Frontend/PCHWriterDecl.cpp @@ -161,6 +161,7 @@ void PCHDeclWriter::VisitTypedefDecl(TypedefDecl *D) { void PCHDeclWriter::VisitTagDecl(TagDecl *D) { VisitTypeDecl(D); + Record.push_back(D->getIdentifierNamespace()); Writer.AddDeclRef(D->getPreviousDeclaration(), Record); Record.push_back((unsigned)D->getTagKind()); // FIXME: stable encoding Record.push_back(D->isDefinition()); @@ -212,6 +213,7 @@ void PCHDeclWriter::VisitDeclaratorDecl(DeclaratorDecl *D) { void PCHDeclWriter::VisitFunctionDecl(FunctionDecl *D) { VisitDeclaratorDecl(D); + Record.push_back(D->getIdentifierNamespace()); Record.push_back(D->getTemplatedKind()); switch (D->getTemplatedKind()) { default: assert(false && "Unhandled TemplatedKind!"); @@ -787,6 +789,7 @@ void PCHDeclWriter::VisitAccessSpecDecl(AccessSpecDecl *D) { } void PCHDeclWriter::VisitFriendDecl(FriendDecl *D) { + VisitDecl(D); Record.push_back(D->Friend.is<TypeSourceInfo*>()); if (D->Friend.is<TypeSourceInfo*>()) Writer.AddTypeSourceInfo(D->Friend.get<TypeSourceInfo*>(), Record); @@ -811,6 +814,7 @@ void PCHDeclWriter::VisitTemplateDecl(TemplateDecl *D) { void PCHDeclWriter::VisitClassTemplateDecl(ClassTemplateDecl *D) { VisitTemplateDecl(D); + Record.push_back(D->getIdentifierNamespace()); Writer.AddDeclRef(D->getPreviousDeclaration(), Record); if (D->getPreviousDeclaration() == 0) { // This ClassTemplateDecl owns the CommonPtr; write it. @@ -899,6 +903,7 @@ void PCHDeclWriter::VisitClassTemplatePartialSpecializationDecl( void PCHDeclWriter::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) { VisitTemplateDecl(D); + Record.push_back(D->getIdentifierNamespace()); Writer.AddDeclRef(D->getPreviousDeclaration(), Record); if (D->getPreviousDeclaration() == 0) { // This FunctionTemplateDecl owns the CommonPtr; write it. |