diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-11-06 00:35:02 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-11-06 00:35:02 +0000 |
commit | 4f11234702bbf453c921328576043998f01fbe0a (patch) | |
tree | 77948aed3c3bf09b6028b1959a8323a6ef2ecf88 /lib/Serialization/ASTWriterDecl.cpp | |
parent | c7be10245e78bf38694b26f289880edefb9f16e9 (diff) | |
download | clang-4f11234702bbf453c921328576043998f01fbe0a.tar.gz clang-4f11234702bbf453c921328576043998f01fbe0a.tar.bz2 clang-4f11234702bbf453c921328576043998f01fbe0a.tar.xz |
[PCH] Write out the ClassTemplateDecl::Common::InjectedClassNameType type
reference instead of relying on computing it.
In general, if storage is no issue, it is preferable to deserialize info from
the PCH instead of trying to recompute it after the PCH was loaded.
The incentive to change this now was due to r155303 changing how friend template
classes in dependent contexts are handled; such classes can now be chained to
a previous template class but the computed InjectedClassNameType may be different
due to the extra template parameters from the dependent context.
The new handling requires more investigation but, in the meantime, writing out
InjectedClassNameType fixes PCH issue in rdar://12627738.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r-- | lib/Serialization/ASTWriterDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp index e84afba549..7486565763 100644 --- a/lib/Serialization/ASTWriterDecl.cpp +++ b/lib/Serialization/ASTWriterDecl.cpp @@ -1084,7 +1084,7 @@ void ASTDeclWriter::VisitClassTemplateDecl(ClassTemplateDecl *D) { Writer.AddDeclRef(&*I, Record); } - // InjectedClassNameType is computed, no need to write it. + Writer.AddTypeRef(D->getCommonPtr()->InjectedClassNameType, Record); } Code = serialization::DECL_CLASS_TEMPLATE; } |