aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-02 23:40:00 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-02 23:40:00 +0000
commit3050ed44aea059f1bb48d05b6dd64478bd8ed0aa (patch)
tree7a28644f67718fde8e604eea65dd2c0af15116b5 /lib
parentefc620c4eb14d2ff59e3ec0714602997ffeddfd7 (diff)
Resynchronize Decl/VarDecl serialization code with the structures
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/DeclSerialization.cpp12
-rw-r--r--lib/Basic/SourceManager.cpp4
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/AST/DeclSerialization.cpp b/lib/AST/DeclSerialization.cpp
index acaced2468..3ffcc49c36 100644
--- a/lib/AST/DeclSerialization.cpp
+++ b/lib/AST/DeclSerialization.cpp
@@ -36,6 +36,7 @@ void Decl::Emit(Serializer& S) const {
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 @@ Decl* Decl::Create(Deserializer& D, ASTContext& C) {
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 ValueDecl::ReadInRec(Deserializer& D, ASTContext& C) {
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 {
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index bb20067d7a..2c667811a1 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -1071,11 +1071,11 @@ SourceManager::CreateAndRegister(llvm::Deserializer &D, FileManager &FMgr) {
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.