]> granicus.if.org Git - clang/commitdiff
Added skeleton for dispatch of Decl serialization.
authorTed Kremenek <kremenek@apple.com>
Mon, 5 Nov 2007 21:38:00 +0000 (21:38 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 5 Nov 2007 21:38:00 +0000 (21:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43737 91177308-0d34-0410-b5e6-96231b3b80d8

AST/DeclSerialization.cpp

index c07edb4a589fc5c015097ecb202ba9c3bb46ef5c..a9819be1cca5ab810d7e1983c359906f949d0798 100644 (file)
 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;
 }