aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHReaderDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-07-20 13:59:40 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-07-20 13:59:40 +0000
commitbc5ab7c9e307fea5ecb979b30815da7a370e1c05 (patch)
treedb39d4e37f726f6f6c287fe268b2d6b5e34b87a3 /lib/Frontend/PCHReaderDecl.cpp
parentcc0b1bc979b650a8a8b34b2032a074fd7724a90d (diff)
Whether the specialization should be added to template's folding set when read from PCH,
is determined by a isCanonicalDecl check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReaderDecl.cpp')
-rw-r--r--lib/Frontend/PCHReaderDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp
index 0231fa66a9..5b41280138 100644
--- a/lib/Frontend/PCHReaderDecl.cpp
+++ b/lib/Frontend/PCHReaderDecl.cpp
@@ -926,7 +926,7 @@ void PCHDeclReader::VisitClassTemplateSpecializationDecl(
D->setPointOfInstantiation(POI);
D->setSpecializationKind((TemplateSpecializationKind)Record[Idx++]);
- if (Record[Idx++]) { // IsKeptInFoldingSet.
+ if (D->isCanonicalDecl()) { // It's kept in the folding set.
ClassTemplateDecl *CanonPattern
= cast<ClassTemplateDecl>(Reader.GetDecl(Record[Idx++]));
if (ClassTemplatePartialSpecializationDecl *Partial