aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriterDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-07-06 15:37:09 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-07-06 15:37:09 +0000
commit057d9afdc7e8027f3b928f0dd8d7d921d7cd5615 (patch)
tree6a1b0868cd9742b5ad4d40dd07e35f71d1a66c44 /lib/Frontend/PCHWriterDecl.cpp
parentd455add086f1dfa16ae87dc310e49493bbc2b0a6 (diff)
Read/write function template specializations for PCH, properly this time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107665 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriterDecl.cpp')
-rw-r--r--lib/Frontend/PCHWriterDecl.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp
index 2dc59726ea..7c672bdabb 100644
--- a/lib/Frontend/PCHWriterDecl.cpp
+++ b/lib/Frontend/PCHWriterDecl.cpp
@@ -923,9 +923,12 @@ void PCHDeclWriter::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) {
if (D->getPreviousDeclaration() == 0) {
// This FunctionTemplateDecl owns the CommonPtr; write it.
- // FunctionTemplateSpecializationInfos are filled through the
- // templated FunctionDecl's setFunctionTemplateSpecialization, no need to
- // write them here.
+ // Write the function specialization declarations.
+ Record.push_back(D->getSpecializations().size());
+ for (llvm::FoldingSet<FunctionTemplateSpecializationInfo>::iterator
+ I = D->getSpecializations().begin(),
+ E = D->getSpecializations().end() ; I != E; ++I)
+ Writer.AddDeclRef(I->Function, Record);
Writer.AddDeclRef(D->getInstantiatedFromMemberTemplate(), Record);
if (D->getInstantiatedFromMemberTemplate())