Eliminate ObjCProtocolDecl's end-of-definition location. It is not
used anywhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147422 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index 9d9b9b1..7837b2b 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -1073,9 +1073,6 @@
 
     /// \brief Referenced protocols
     ObjCProtocolList ReferencedProtocols;    
-
-    /// \brief Marks the '>' or identifier.
-    SourceLocation EndLoc; 
   };
   
   DefinitionData *Data;
@@ -1189,15 +1186,6 @@
     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();
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 9658174..bc35055 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -615,7 +615,6 @@
     /// Check then save referenced protocols.
     PDecl->setProtocolList((ObjCProtocolDecl**)ProtoRefs, NumProtoRefs,
                            ProtoLocs, Context);
-    PDecl->setEndOfDefinitionLoc(EndProtoLoc);
   }
 
   CheckObjCDeclScope(PDecl);
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp
index 75a2aad..13d1569 100644
--- a/lib/Serialization/ASTReaderDecl.cpp
+++ b/lib/Serialization/ASTReaderDecl.cpp
@@ -821,8 +821,6 @@
     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) {
diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp
index 8510fec..a995e37 100644
--- a/lib/Serialization/ASTWriterDecl.cpp
+++ b/lib/Serialization/ASTWriterDecl.cpp
@@ -531,7 +531,6 @@
            PLEnd = D->protocol_loc_end();
          PL != PLEnd; ++PL)
       Writer.AddSourceLocation(*PL, Record);
-    Writer.AddSourceLocation(D->getEndOfDefinitionLoc(), Record);
   }
   
   Code = serialization::DECL_OBJC_PROTOCOL;