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
diff --git a/lib/AST/DeclSerialization.cpp b/lib/AST/DeclSerialization.cpp
index dcb8cda..ea027df 100644
--- a/lib/AST/DeclSerialization.cpp
+++ b/lib/AST/DeclSerialization.cpp
@@ -598,21 +598,17 @@
 //===----------------------------------------------------------------------===//
 
 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;
 }