[cfe-commits] r43737 - /cfe/trunk/AST/DeclSerialization.cpp
Ted Kremenek
kremenek at apple.com
Mon Nov 5 13:38:06 PST 2007
Author: kremenek
Date: Mon Nov 5 15:38:00 2007
New Revision: 43737
URL: http://llvm.org/viewvc/llvm-project?rev=43737&view=rev
Log:
Added skeleton for dispatch of Decl serialization.
Modified:
cfe/trunk/AST/DeclSerialization.cpp
Modified: cfe/trunk/AST/DeclSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/DeclSerialization.cpp?rev=43737&r1=43736&r2=43737&view=diff
==============================================================================
--- cfe/trunk/AST/DeclSerialization.cpp (original)
+++ cfe/trunk/AST/DeclSerialization.cpp Mon Nov 5 15:38:00 2007
@@ -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;
}
More information about the cfe-commits
mailing list