From 4f50ee3e6db9d5ec8c1a56fa07510dab06194564 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Sun, 28 Oct 2007 21:21:04 +0000 Subject: [PATCH] Implemented serialization for TypedefType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43423 91177308-0d34-0410-b5e6-96231b3b80d8 --- AST/TypeSerialization.cpp | 12 ++++++++++++ include/clang/AST/Type.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/AST/TypeSerialization.cpp b/AST/TypeSerialization.cpp index 83d8400d3f..ef3dc7931f 100644 --- a/AST/TypeSerialization.cpp +++ b/AST/TypeSerialization.cpp @@ -203,3 +203,15 @@ FunctionTypeProto* FunctionTypeProto::Materialize(llvm::Deserializer& D) { 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; +} diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 0bfc86f4d0..e62264b728 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -823,6 +823,9 @@ public: 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).