diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-02 11:55:01 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-02 11:55:01 +0000 |
commit | d8a0c6f92c13b06f24ef894099b9fca1004d445b (patch) | |
tree | e3f973e1829eae684cda58767adafa95ec082ab5 /lib/Frontend/PCHWriterDecl.cpp | |
parent | b8b03e6df1cc89e701a809c6a47c41f31b7a9e50 (diff) |
Generally types expect an initialized TypeDecl; its safer and less complicated to delay PCH reading the type of a TypeDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriterDecl.cpp')
-rw-r--r-- | lib/Frontend/PCHWriterDecl.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp index 29bbae23ae..000c2d8ba8 100644 --- a/lib/Frontend/PCHWriterDecl.cpp +++ b/lib/Frontend/PCHWriterDecl.cpp @@ -137,14 +137,7 @@ void PCHDeclWriter::VisitNamedDecl(NamedDecl *D) { void PCHDeclWriter::VisitTypeDecl(TypeDecl *D) { VisitNamedDecl(D); - if (isa<CXXRecordDecl>(D)) { - // FIXME: Hack. To read a templated CXXRecordDecl from PCH, we need an - // initialized CXXRecordDecl before creating an InjectedClassNameType. - // Delay emitting/reading CXXRecordDecl's TypeForDecl until when we handle - // CXXRecordDecl emitting/initialization. - Writer.AddTypeRef(QualType(), Record); - } else - Writer.AddTypeRef(QualType(D->getTypeForDecl(), 0), Record); + Writer.AddTypeRef(QualType(D->getTypeForDecl(), 0), Record); } void PCHDeclWriter::VisitTypedefDecl(TypedefDecl *D) { |