[cfe-commits] r43423 - in /cfe/trunk: AST/TypeSerialization.cpp include/clang/AST/Type.h
Ted Kremenek
kremenek at apple.com
Sun Oct 28 14:21:04 PDT 2007
Author: kremenek
Date: Sun Oct 28 16:21:04 2007
New Revision: 43423
URL: http://llvm.org/viewvc/llvm-project?rev=43423&view=rev
Log:
Implemented serialization for TypedefType.
Modified:
cfe/trunk/AST/TypeSerialization.cpp
cfe/trunk/include/clang/AST/Type.h
Modified: cfe/trunk/AST/TypeSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/TypeSerialization.cpp?rev=43423&r1=43422&r2=43423&view=diff
==============================================================================
--- cfe/trunk/AST/TypeSerialization.cpp (original)
+++ cfe/trunk/AST/TypeSerialization.cpp Sun Oct 28 16:21:04 2007
@@ -203,3 +203,15 @@
return FTP;
}
+
+void TypedefType::Emit(llvm::Serializer& S) const {
+ EmitTypeInternal(S);
+ S.EmitPtr(Decl);
+}
+
+TypedefType* TypedefType::Materialize(llvm::Deserializer& D) {
+ TypedefType* T = new TypedefType(NULL,QualType());
+ T->ReadTypeInternal(D);
+ D.ReadPtr(T->Decl);
+ return T;
+}
Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=43423&r1=43422&r2=43423&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Sun Oct 28 16:21:04 2007
@@ -823,6 +823,9 @@
static bool classof(const Type *T) { return T->getTypeClass() == TypeName; }
static bool classof(const TypedefType *) { return true; }
+
+ void Emit(llvm::Serializer& S) const;
+ static TypedefType* Materialize(llvm::Deserializer& D);
};
/// TypeOfExpr (GCC extension).
More information about the cfe-commits
mailing list