aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-10-28 21:21:04 +0000
committerTed Kremenek <kremenek@apple.com>2007-10-28 21:21:04 +0000
commit4f50ee3e6db9d5ec8c1a56fa07510dab06194564 (patch)
treec8926866cc2531750a7a9775eef41f88b45c41a6
parent4340bfa9f442b450b8d81081fb463b03a0096230 (diff)
Implemented serialization for TypedefType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43423 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--AST/TypeSerialization.cpp12
-rw-r--r--include/clang/AST/Type.h3
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).