diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 8 | ||||
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 1da0fab0ba..e088c66229 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -224,14 +224,14 @@ void ObjCInterfaceDecl::mergeClassExtensionProtocolList( void ObjCInterfaceDecl::allocateDefinitionData() { assert(!hasDefinition() && "ObjC class already has a definition"); - Definition.setPointer(new (getASTContext()) DefinitionData()); - Definition.setInt(true); + Data = new (getASTContext()) DefinitionData(); + Data->Definition = this; // Update all of the declarations with a pointer to the definition. for (redecl_iterator RD = redecls_begin(), RDEnd = redecls_end(); RD != RDEnd; ++RD) { if (*RD != this) - RD->Definition.setPointer(Definition.getPointer()); + RD->Data = Data; } } @@ -684,7 +684,7 @@ ObjCInterfaceDecl:: ObjCInterfaceDecl(DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id, SourceLocation CLoc, bool FD, bool isInternal) : ObjCContainerDecl(ObjCInterface, DC, Id, CLoc, atLoc), - TypeForDecl(0), Definition(), InitiallyForwardDecl(FD) + TypeForDecl(0), Data(), InitiallyForwardDecl(FD) { setImplicit(isInternal); } diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index 6fc5764006..4dc960bdff 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -613,15 +613,15 @@ void ASTDeclReader::VisitObjCInterfaceDecl(ObjCInterfaceDecl *ID) { for (ASTReader::ForwardRefs::iterator I = Refs.begin(), E = Refs.end(); I != E; ++I) - cast<ObjCInterfaceDecl>(*I)->Definition = ID->Definition; + cast<ObjCInterfaceDecl>(*I)->Data = ID->Data; #ifndef NDEBUG // We later check whether PendingForwardRefs is empty to make sure all // pending references were linked. Reader.PendingForwardRefs.erase(ID); #endif } else if (Def) { - if (Def->Definition.getPointer()) { - ID->Definition.setPointer(Def->Definition.getPointer()); + if (Def->Data) { + ID->Data = Def->Data; } else { // The definition is still initializing. Reader.PendingForwardRefs[Def].push_back(ID); @@ -2072,8 +2072,8 @@ void ASTDeclReader::UpdateDecl(Decl *D, ModuleFile &ModuleFile, ObjCInterfaceDecl *ID = cast<ObjCInterfaceDecl>(D); ObjCInterfaceDecl *Def = Reader.ReadDeclAs<ObjCInterfaceDecl>(ModuleFile, Record, Idx); - if (Def->Definition.getPointer()) { - ID->Definition.setPointer(Def->Definition.getPointer()); + if (Def->Data) { + ID->Data = Def->Data; } else { // The definition is still initializing. Reader.PendingForwardRefs[Def].push_back(ID); |