diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-02-05 23:33:38 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-02-05 23:33:38 +0000 |
| commit | eff93e04018effd78ac738b1e2385a986accc8b0 (patch) | |
| tree | 71146de25fc086d28015a2f216ba83f953f38bab /clang/lib/AST/DeclSerialization.cpp | |
| parent | 409b794cfe49a269e3b6ac4c006cdba091b67c23 (diff) | |
| download | bcm5719-llvm-eff93e04018effd78ac738b1e2385a986accc8b0.tar.gz bcm5719-llvm-eff93e04018effd78ac738b1e2385a986accc8b0.zip | |
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.
llvm-svn: 63899
Diffstat (limited to 'clang/lib/AST/DeclSerialization.cpp')
| -rw-r--r-- | clang/lib/AST/DeclSerialization.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/AST/DeclSerialization.cpp b/clang/lib/AST/DeclSerialization.cpp index dcb8cda33bf..ea027df1df9 100644 --- a/clang/lib/AST/DeclSerialization.cpp +++ b/clang/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; } |

