diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-15 22:34:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-15 22:34:59 +0000 |
commit | 05c272fed899b8d3142cf080e86a235fc6168862 (patch) | |
tree | 1d822da7f91782d042b281ea72a850a7c25de6ed /lib/Serialization | |
parent | bcb3b981da3d29844fea4099c529b43e814b6d7d (diff) |
Move ObjCInterfaceDecl's "EndLoc" into DefinitionData, since it only
applies to an actual definition. Plus, clarify the purpose of this
field and give the accessor a different name, since getLocEnd() is
supposed to be the same as getSourceRange().getEnd().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization')
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 4 | ||||
-rw-r--r-- | lib/Serialization/ASTWriterDecl.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index 12b61b0cdd..cacacd2394 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -569,6 +569,8 @@ void ASTDeclReader::VisitObjCInterfaceDecl(ObjCInterfaceDecl *ID) { Data.SuperClass = ReadDeclAs<ObjCInterfaceDecl>(Record, Idx); Data.SuperClassLoc = ReadSourceLocation(Record, Idx); + Data.EndLoc = ReadSourceLocation(Record, Idx); + // Read the directly referenced protocols and their SourceLocations. unsigned NumProtocols = Record[Idx++]; SmallVector<ObjCProtocolDecl *, 16> Protocols; @@ -628,8 +630,6 @@ void ASTDeclReader::VisitObjCInterfaceDecl(ObjCInterfaceDecl *ID) { } } } - - ID->setLocEnd(ReadSourceLocation(Record, Idx)); } void ASTDeclReader::VisitObjCIvarDecl(ObjCIvarDecl *IVD) { diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp index 7a194a8d18..9b74aaeae4 100644 --- a/lib/Serialization/ASTWriterDecl.cpp +++ b/lib/Serialization/ASTWriterDecl.cpp @@ -460,7 +460,8 @@ void ASTDeclWriter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) { Writer.AddDeclRef(D->getSuperClass(), Record); Writer.AddSourceLocation(D->getSuperClassLoc(), Record); - + Writer.AddSourceLocation(D->getEndOfDefinitionLoc(), Record); + // Write out the protocols that are directly referenced by the @interface. Record.push_back(Data.ReferencedProtocols.size()); for (ObjCInterfaceDecl::protocol_iterator P = D->protocol_begin(), @@ -489,7 +490,6 @@ void ASTDeclWriter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) { Writer.AddDeclRef(D->getCategoryList(), Record); } - Writer.AddSourceLocation(D->getLocEnd(), Record); Code = serialization::DECL_OBJC_INTERFACE; } |