[cfe-commits] r147422 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/Sema/SemaDeclObjC.cpp lib/Serialization/ASTReaderDecl.cpp lib/Serialization/ASTWriterDecl.cpp
Douglas Gregor
dgregor at apple.com
Sun Jan 1 18:22:52 PST 2012
Author: dgregor
Date: Sun Jan 1 20:22:52 2012
New Revision: 147422
URL: http://llvm.org/viewvc/llvm-project?rev=147422&view=rev
Log:
Eliminate ObjCProtocolDecl's end-of-definition location. It is not
used anywhere.
Modified:
cfe/trunk/include/clang/AST/DeclObjC.h
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=147422&r1=147421&r2=147422&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Sun Jan 1 20:22:52 2012
@@ -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();
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=147422&r1=147421&r2=147422&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Sun Jan 1 20:22:52 2012
@@ -615,7 +615,6 @@
/// Check then save referenced protocols.
PDecl->setProtocolList((ObjCProtocolDecl**)ProtoRefs, NumProtoRefs,
ProtoLocs, Context);
- PDecl->setEndOfDefinitionLoc(EndProtoLoc);
}
CheckObjCDeclScope(PDecl);
Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=147422&r1=147421&r2=147422&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Sun Jan 1 20:22:52 2012
@@ -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) {
Modified: cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterDecl.cpp?rev=147422&r1=147421&r2=147422&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriterDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriterDecl.cpp Sun Jan 1 20:22:52 2012
@@ -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;
More information about the cfe-commits
mailing list