]> granicus.if.org Git - clang/commitdiff
Eliminate ObjCProtocolDecl's end-of-definition location. It is not
authorDouglas Gregor <dgregor@apple.com>
Mon, 2 Jan 2012 02:22:52 +0000 (02:22 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 2 Jan 2012 02:22:52 +0000 (02:22 +0000)
used anywhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147422 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclObjC.h
lib/Sema/SemaDeclObjC.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp

index 9d9b9b1d7d8a534d005adbf7341dfb67fa395825..7837b2b2f2a50bd20c0fa9ce25d23af95b0a1381 100644 (file)
@@ -1073,9 +1073,6 @@ class ObjCProtocolDecl : public ObjCContainerDecl,
 
     /// \brief Referenced protocols
     ObjCProtocolList ReferencedProtocols;    
-
-    /// \brief Marks the '>' or identifier.
-    SourceLocation EndLoc; 
   };
   
   DefinitionData *Data;
@@ -1189,15 +1186,6 @@ public:
     return SourceRange(getAtStartLoc(), getLocation());
   }
                            
-  SourceLocation getEndOfDefinitionLoc() const { 
-    if (!hasDefinition())
-      return getLocation();
-   
-    return data().EndLoc; 
-  }
-   
-  void setEndOfDefinitionLoc(SourceLocation LE) { data().EndLoc = LE; }
-
   typedef redeclarable_base::redecl_iterator redecl_iterator;
   redecl_iterator redecls_begin() const {
     return redeclarable_base::redecls_begin();
index 9658174f97d12c7940f82f9df748fb1336287a4f..bc35055722154dadc78a57625f1e8e3349a80220 100644 (file)
@@ -615,7 +615,6 @@ Sema::ActOnStartProtocolInterface(SourceLocation AtProtoInterfaceLoc,
     /// Check then save referenced protocols.
     PDecl->setProtocolList((ObjCProtocolDecl**)ProtoRefs, NumProtoRefs,
                            ProtoLocs, Context);
-    PDecl->setEndOfDefinitionLoc(EndProtoLoc);
   }
 
   CheckObjCDeclScope(PDecl);
index 75a2aad5e47cd1f1d0cbe1bf58d97ea8a79c5fb6..13d1569d519a858ed74ce274b16f730533319e40 100644 (file)
@@ -821,8 +821,6 @@ void ASTDeclReader::VisitObjCProtocolDecl(ObjCProtocolDecl *PD) {
     PD->setProtocolList(ProtoRefs.data(), NumProtoRefs, ProtoLocs.data(),
                         Reader.getContext());
     
-    PD->setEndOfDefinitionLoc(ReadSourceLocation(Record, Idx));
-
     // Note that we have deserialized a definition.
     Reader.PendingDefinitions.insert(PD);
   } else if (Def && Def->Data) {
index 8510feca5e5639e83248355ab61c071e67c9032f..a995e37ee7b88f0cc5dec574dcc6b4f3aaaae932 100644 (file)
@@ -531,7 +531,6 @@ void ASTDeclWriter::VisitObjCProtocolDecl(ObjCProtocolDecl *D) {
            PLEnd = D->protocol_loc_end();
          PL != PLEnd; ++PL)
       Writer.AddSourceLocation(*PL, Record);
-    Writer.AddSourceLocation(D->getEndOfDefinitionLoc(), Record);
   }
   
   Code = serialization::DECL_OBJC_PROTOCOL;