diff options
-rw-r--r-- | AST/TypeSerialization.cpp | 12 | ||||
-rw-r--r-- | include/clang/AST/Type.h | 3 |
2 files changed, 15 insertions, 0 deletions
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). |