[cfe-commits] r68346 - in /cfe/trunk/lib: AST/DeclSerialization.cpp Basic/SourceManager.cpp
Douglas Gregor
dgregor at apple.com
Thu Apr 2 16:40:03 PDT 2009
Author: dgregor
Date: Thu Apr 2 18:40:00 2009
New Revision: 68346
URL: http://llvm.org/viewvc/llvm-project?rev=68346&view=rev
Log:
Resynchronize Decl/VarDecl serialization code with the structures
Modified:
cfe/trunk/lib/AST/DeclSerialization.cpp
cfe/trunk/lib/Basic/SourceManager.cpp
Modified: cfe/trunk/lib/AST/DeclSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclSerialization.cpp?rev=68346&r1=68345&r2=68346&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclSerialization.cpp (original)
+++ cfe/trunk/lib/AST/DeclSerialization.cpp Thu Apr 2 18:40:00 2009
@@ -36,6 +36,7 @@
S.EmitBool(InvalidDecl);
// FIXME: HasAttrs?
S.EmitBool(Implicit);
+ S.EmitInt(IdentifierNamespace);
S.EmitInt(Access);
S.EmitPtr(cast_or_null<Decl>(getDeclContext())); // From Decl.
S.EmitPtr(cast_or_null<Decl>(getLexicalDeclContext())); // From Decl.
@@ -122,6 +123,7 @@
Dcl->InvalidDecl = D.ReadBool();
// FIXME: HasAttrs?
Dcl->Implicit = D.ReadBool();
+ Dcl->IdentifierNamespace = D.ReadInt();
Dcl->Access = D.ReadInt();
assert(Dcl->DeclCtx.getOpaqueValue() == 0);
@@ -274,11 +276,21 @@
void VarDecl::EmitInRec(Serializer& S) const {
ValueDecl::EmitInRec(S);
S.EmitInt(getStorageClass()); // From VarDecl.
+ S.EmitBool(ThreadSpecified);
+ S.EmitBool(HasCXXDirectInit);
+ S.EmitBool(DeclaredInCondition);
+ S.EmitPtr(PreviousDeclaration);
+ S.Emit(TypeSpecStartLoc);
}
void VarDecl::ReadInRec(Deserializer& D, ASTContext& C) {
ValueDecl::ReadInRec(D, C);
SClass = static_cast<StorageClass>(D.ReadInt()); // From VarDecl.
+ ThreadSpecified = D.ReadBool();
+ HasCXXDirectInit = D.ReadBool();
+ DeclaredInCondition = D.ReadBool();
+ D.ReadPtr(PreviousDeclaration);
+ TypeSpecStartLoc = SourceLocation::ReadVal(D);
}
void VarDecl::EmitOutRec(Serializer& S) const {
Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=68346&r1=68345&r2=68346&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Thu Apr 2 18:40:00 2009
@@ -1071,11 +1071,11 @@
ContentCache::ReadToSourceManager(D,*M,&FMgr,Buf);
}*/
- { // Read: MemBufferInfos.
+ /*{ // FIXME Read: MemBufferInfos.
llvm::Deserializer::Location BLoc = D.getCurrentBlockLocation();
while (!D.FinishedBlock(BLoc))
ContentCache::ReadToSourceManager(D,*M,NULL,Buf);
- }
+ }*/
// FIXME: Read SLocEntryTable.
More information about the cfe-commits
mailing list