Added skeleton for dispatch of Decl serialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43737 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/DeclSerialization.cpp b/AST/DeclSerialization.cpp
index c07edb4..a9819be 100644
--- a/AST/DeclSerialization.cpp
+++ b/AST/DeclSerialization.cpp
@@ -19,11 +19,33 @@
 using namespace clang;
 
 void Decl::Emit(llvm::Serializer& S) const {
-  assert ("FIXME: not implemented.");
+  S.EmitInt(getKind());
+
+  switch (getKind()) {
+    default:
+      assert (false && "Not implemented.");
+      break;
+      
+    case BlockVar:
+      cast<BlockVarDecl>(this)->Emit(S);
+      break;
+      
+    case FileVar:
+      cast<FileVarDecl>(this)->Emit(S);
+      break;
+      
+    case ParmVar:
+      cast<ParmVarDecl>(this)->Emit(S);
+      break;
+      
+    case Function:
+      cast<FunctionDecl>(this)->Emit(S);
+      break;
+  }
 }
 
 Decl* Decl::Materialize(llvm::Deserializer& D) {
-  assert ("FIXME: not implemented.");
+  assert (false && "FIXME: not implemented.");
   return NULL;
 }