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 | c8f9af2943699ff623ca08f2e5ed4d72e0351189 (patch) | |
tree | 19087b3d17769386fae0492c67db32823af27579 /lib/Frontend/PCHWriterDecl.cpp | |
parent | 7b081c8604efd33bc7f7e5c1e9427a031eedb2b4 (diff) |
Read/write the identifier namespace in PCH for decls that may modify it.
We can now use a PCH'ed <map>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107617 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriterDecl.cpp')
-rw-r--r-- | lib/Frontend/PCHWriterDecl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp index 9f7264ede1..983d6dbd77 100644 --- a/lib/Frontend/PCHWriterDecl.cpp +++ b/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. |