Implemented serialization of FunctionTypeNoProto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43418 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/TypeSerialization.cpp b/AST/TypeSerialization.cpp
index 0ffdb99..efd6e76 100644
--- a/AST/TypeSerialization.cpp
+++ b/AST/TypeSerialization.cpp
@@ -153,3 +153,22 @@
   T->NumElements = D.ReadInt();
   return T;
 }
+
+void FunctionType::EmitFunctionTypeInternal(llvm::Serializer &S) const {
+  EmitTypeInternal(S);
+  S.EmitBool(SubClassData);
+  S.Emit(ResultType);
+}
+
+void FunctionType::ReadFunctionTypeInternal(llvm::Deserializer& D) {
+  ReadTypeInternal(D);
+  SubClassData = D.ReadBool();
+  D.Read(ResultType);
+}
+
+
+FunctionTypeNoProto* FunctionTypeNoProto::Materialize(llvm::Deserializer& D) {
+  FunctionTypeNoProto* T = new FunctionTypeNoProto(QualType(),QualType());
+  T->ReadFunctionTypeInternal(D);
+  return T;
+}
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h
index cc4d544..c8ee202 100644
--- a/include/clang/AST/Type.h
+++ b/include/clang/AST/Type.h
@@ -711,6 +711,10 @@
            T->getTypeClass() == FunctionProto;
   }
   static bool classof(const FunctionType *) { return true; }
+  
+protected:
+  void EmitFunctionTypeInternal(llvm::Serializer& S) const;
+  void ReadFunctionTypeInternal(llvm::Deserializer& D);
 };
 
 /// FunctionTypeNoProto - Represents a K&R-style 'int foo()' function, which has
@@ -735,6 +739,9 @@
     return T->getTypeClass() == FunctionNoProto;
   }
   static bool classof(const FunctionTypeNoProto *) { return true; }
+  
+  void Emit(llvm::Serializer& S) const { EmitFunctionTypeInternal(S); }
+  static FunctionTypeNoProto* Materialize(llvm::Deserializer& D);
 };
 
 /// FunctionTypeProto - Represents a prototype with argument type info, e.g.