Add some side-effect free Create methods for TypeDecl subclasses and use them for PCH reading.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107468 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp
index 120596b..2bdf166 100644
--- a/lib/Frontend/PCHReaderDecl.cpp
+++ b/lib/Frontend/PCHReaderDecl.cpp
@@ -1145,11 +1145,10 @@
     D = TypedefDecl::Create(*Context, 0, SourceLocation(), 0, 0);
     break;
   case pch::DECL_ENUM:
-    D = EnumDecl::Create(*Context, 0, SourceLocation(), 0, SourceLocation(), 0);
+    D = EnumDecl::Create(*Context, Decl::EmptyShell());
     break;
   case pch::DECL_RECORD:
-    D = RecordDecl::Create(*Context, TTK_Struct, 0, SourceLocation(),
-                           0, SourceLocation(), 0);
+    D = RecordDecl::Create(*Context, Decl::EmptyShell());
     break;
   case pch::DECL_ENUM_CONSTANT:
     D = EnumConstantDecl::Create(*Context, 0, SourceLocation(), 0, QualType(),
@@ -1196,8 +1195,7 @@
                                             DeclarationName());
     break;
   case pch::DECL_CXX_RECORD:
-    D = CXXRecordDecl::Create(*Context, TTK_Struct, 0,
-                              SourceLocation(), 0, SourceLocation(), 0);
+    D = CXXRecordDecl::Create(*Context, Decl::EmptyShell());
     break;
   case pch::DECL_CXX_METHOD:
     D = CXXMethodDecl::Create(*Context, 0, SourceLocation(), DeclarationName(),
@@ -1227,17 +1225,18 @@
                                   DeclarationName(), 0, 0, 0);
     break;
   case pch::DECL_CLASS_TEMPLATE_SPECIALIZATION:
-    D = ClassTemplateSpecializationDecl::CreateEmpty(*Context);
+    D = ClassTemplateSpecializationDecl::Create(*Context, Decl::EmptyShell());
     break;
   case pch::DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION:
-    D = ClassTemplatePartialSpecializationDecl::CreateEmpty(*Context);
+    D = ClassTemplatePartialSpecializationDecl::Create(*Context,
+                                                            Decl::EmptyShell());
     break;
   case pch::DECL_FUNCTION_TEMPLATE:
     D = FunctionTemplateDecl::Create(*Context, 0, SourceLocation(),
                                      DeclarationName(), 0, 0);
     break;
   case pch::DECL_TEMPLATE_TYPE_PARM:
-    D = TemplateTypeParmDecl::Create(*Context, 0, SourceLocation(), 0,0,0,0,0);
+    D = TemplateTypeParmDecl::Create(*Context, Decl::EmptyShell());
     break;
   case pch::DECL_NON_TYPE_TEMPLATE_PARM:
     D = NonTypeTemplateParmDecl::Create(*Context, 0, SourceLocation(), 0,0,0,