diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-06-25 16:25:09 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-06-25 16:25:09 +0000 |
commit | b24e199fbd17af780ab000c5862d191e4daffc0f (patch) | |
tree | 38fa1c7bc5778b722be9dce31005dcea593f4e9d /lib/Frontend/PCHWriterDecl.cpp | |
parent | c4117aae93de65206fec2c82db82ee060b6fbe88 (diff) |
Support NonTypeTemplateParmDecl for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106860 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriterDecl.cpp')
-rw-r--r-- | lib/Frontend/PCHWriterDecl.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp index d505caff96..36a1848d2a 100644 --- a/lib/Frontend/PCHWriterDecl.cpp +++ b/lib/Frontend/PCHWriterDecl.cpp @@ -815,7 +815,17 @@ void PCHDeclWriter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { } void PCHDeclWriter::VisitNonTypeTemplateParmDecl(NonTypeTemplateParmDecl *D) { - assert(false && "cannot write NonTypeTemplateParmDecl"); + VisitVarDecl(D); + // TemplateParmPosition. + Record.push_back(D->getDepth()); + Record.push_back(D->getPosition()); + // Rest of NonTypeTemplateParmDecl. + Record.push_back(D->getDefaultArgument() != 0); + if (D->getDefaultArgument()) { + Writer.AddStmt(D->getDefaultArgument()); + Record.push_back(D->defaultArgumentWasInherited()); + } + Code = pch::DECL_NON_TYPE_TEMPLATE_PARM; } void PCHDeclWriter::VisitTemplateTemplateParmDecl(TemplateTemplateParmDecl *D) { |