[cfe-commits] r43618 - in /cfe/trunk: AST/ASTContext.cpp include/clang/AST/ASTContext.h
Ted Kremenek
kremenek at apple.com
Thu Nov 1 11:11:33 PDT 2007
Author: kremenek
Date: Thu Nov 1 13:11:32 2007
New Revision: 43618
URL: http://llvm.org/viewvc/llvm-project?rev=43618&view=rev
Log:
Implemented serialization of QualTypes within ASTContext. Clarified
ownership model of some type pointers. Added FIXMEs to serialization.
Added comments to ASTContext indicating which variables we are intentionally
*not* serializing.
Modified:
cfe/trunk/AST/ASTContext.cpp
cfe/trunk/include/clang/AST/ASTContext.h
Modified: cfe/trunk/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/ASTContext.cpp?rev=43618&r1=43617&r2=43618&view=diff
==============================================================================
--- cfe/trunk/AST/ASTContext.cpp (original)
+++ cfe/trunk/AST/ASTContext.cpp Thu Nov 1 13:11:32 2007
@@ -1419,9 +1419,17 @@
EmitSet(VectorTypes,S);
EmitSet(FunctionTypeNoProtos,S);
EmitSet(FunctionTypeProtos,S);
-
// FIXME: EmitSet(ObjcQualifiedInterfaceTypes,S);
- // FIXME: RecourdLayoutInfo
+
+ S.Emit(BuiltinVaListType);
+ S.Emit(ObjcIdType);
+ S.EmitPtr(IdStructType);
+ S.Emit(ObjcProtoType);
+ S.EmitPtr(ProtoStructType);
+ S.Emit(ObjcClassType);
+ S.EmitPtr(ClassStructType);
+ S.Emit(ObjcConstantStringType);
+ // FIXME: S.EmitOwnedPtr(CFConstantStringTypeDecl);
}
ASTContext* ASTContext::Materialize(llvm::Deserializer& D) {
@@ -1466,6 +1474,17 @@
ReadSet(A->VectorTypes, A->Types, D);
ReadSet(A->FunctionTypeNoProtos, A->Types, D);
ReadSet(A->FunctionTypeProtos, A->Types, D);
+ // ReadSet(A->ObjcQualifiedInterfaceTypes,D);
+
+ D.Read(A->BuiltinVaListType);
+ D.Read(A->ObjcIdType);
+ D.ReadPtr(A->IdStructType);
+ D.Read(A->ObjcProtoType);
+ D.ReadPtr(A->ProtoStructType);
+ D.Read(A->ObjcClassType);
+ D.ReadPtr(A->ClassStructType);
+ D.Read(A->ObjcConstantStringType);
+ // FIXME: A->CFConstantStringTypeDecl = D.ReadOwnedPtr<RecordDecl>();
return A;
}
Modified: cfe/trunk/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=43618&r1=43617&r2=43618&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ASTContext.h (original)
+++ cfe/trunk/include/clang/AST/ASTContext.h Thu Nov 1 13:11:32 2007
@@ -42,6 +42,9 @@
llvm::FoldingSet<FunctionTypeNoProto> FunctionTypeNoProtos;
llvm::FoldingSet<FunctionTypeProto> FunctionTypeProtos;
llvm::FoldingSet<ObjcQualifiedInterfaceType> ObjcQualifiedInterfaceTypes;
+
+ /// RecordLayoutInfo - A cache mapping from RecordDecls to RecordLayoutInfo.
+ /// This is lazily created. This is intentionally not serialized.
llvm::DenseMap<const RecordDecl*, const RecordLayout*> RecordLayoutInfo;
/// BuiltinVaListType - built-in va list type.
@@ -73,6 +76,10 @@
TargetInfo &Target;
IdentifierTable &Idents;
SelectorTable &Selectors;
+
+ /// This is intentionally not serialized. It is populated by the
+ /// ASTContext ctor, and there are no external pointers/references to
+ /// internal variables of BuiltinInfo.
Builtin::Context BuiltinInfo;
// Builtin Types.
More information about the cfe-commits
mailing list