aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclSerialization.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-05 23:33:38 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-05 23:33:38 +0000
commitfab9d67cebb87be968e7ae31a3b549a5279b5d51 (patch)
treee6e71ce878f610e0f9539097db19e55df64e566e /lib/AST/DeclSerialization.cpp
parent4a3aed942bd6e4e73679b1676bc1ac82248b592d (diff)
Improve the representation of template type parameters. We now
canonicalize by template parameter depth, index, and name, and the unnamed version of a template parameter serves as the canonical. TemplateTypeParmDecl no longer needs to inherit from TemplateParmPosition, since depth and index information is present within the type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclSerialization.cpp')
-rw-r--r--lib/AST/DeclSerialization.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/AST/DeclSerialization.cpp b/lib/AST/DeclSerialization.cpp
index dcb8cda33b..ea027df1df 100644
--- a/lib/AST/DeclSerialization.cpp
+++ b/lib/AST/DeclSerialization.cpp
@@ -598,21 +598,17 @@ TypedefDecl* TypedefDecl::CreateImpl(Deserializer& D, ASTContext& C) {
//===----------------------------------------------------------------------===//
void TemplateTypeParmDecl::EmitImpl(Serializer& S) const {
- S.EmitInt(Depth);
- S.EmitInt(Position);
S.EmitBool(Typename);
- NamedDecl::EmitInRec(S);
+ TypeDecl::EmitInRec(S);
}
TemplateTypeParmDecl *
TemplateTypeParmDecl::CreateImpl(Deserializer& D, ASTContext& C) {
- unsigned Depth = D.ReadInt();
- unsigned Position = D.ReadInt();
bool Typename = D.ReadBool();
TemplateTypeParmDecl *decl
- = new (C) TemplateTypeParmDecl(0, SourceLocation(), Depth, Position,
- 0, Typename);
- decl->NamedDecl::ReadInRec(D, C);
+ = new (C) TemplateTypeParmDecl(0, SourceLocation(), 0, Typename,
+ QualType());
+ decl->TypeDecl::ReadInRec(D, C);
return decl;
}