diff options
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterDecl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index 3f990e7a565..76974667a89 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/lib/Serialization/ASTWriterDecl.cpp @@ -257,6 +257,12 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { } Writer.AddSourceLocation(FTSInfo->getPointOfInstantiation(), Record); + + if (D->isCanonicalDecl()) { + // Write the template that contains the specializations set. We will + // add a FunctionTemplateSpecializationInfo to it when reading. + Writer.AddDeclRef(FTSInfo->getTemplate()->getCanonicalDecl(), Record); + } break; } case FunctionDecl::TK_DependentFunctionTemplateSpecialization: { |