aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/TypeSerialization.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-07-27 03:47:53 +0000
committerTed Kremenek <kremenek@apple.com>2008-07-27 03:47:53 +0000
commitd90700108cfb45f2dda6c5a7adc11ce5ac68aa0d (patch)
tree359f4875de281dbce0f77db18b2ff99d4556dd11 /lib/AST/TypeSerialization.cpp
parentc36d405a02fab41f6c45cb2bc750d64949742903 (diff)
Fix serialization for TypedefType by allowing TypedefType to access the internal CanonicalType stored in Type.
The test case Serialization/stmt_exprs.c now passes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54117 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/TypeSerialization.cpp')
-rw-r--r--lib/AST/TypeSerialization.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/TypeSerialization.cpp b/lib/AST/TypeSerialization.cpp
index 00b71b65b5..60b5c68b0c 100644
--- a/lib/AST/TypeSerialization.cpp
+++ b/lib/AST/TypeSerialization.cpp
@@ -239,7 +239,7 @@ Type* TagType::CreateImpl(ASTContext& Context, Deserializer& D) {
//===----------------------------------------------------------------------===//
void TypedefType::EmitImpl(Serializer& S) const {
- S.Emit(QualType((Type*)this,0)/*.getCanonicalType()*/);
+ S.Emit(getCanonicalTypeInternal());
S.EmitPtr(Decl);
}
@@ -247,7 +247,7 @@ Type* TypedefType::CreateImpl(ASTContext& Context, Deserializer& D) {
std::vector<Type*>& Types =
const_cast<std::vector<Type*>&>(Context.getTypes());
- TypedefType* T = new TypedefType(Type::TypeName, NULL,QualType::ReadVal(D));
+ TypedefType* T = new TypedefType(Type::TypeName, NULL, QualType::ReadVal(D));
Types.push_back(T);
D.ReadPtr(T->Decl); // May be backpatched.