diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-27 22:43:10 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-27 22:43:10 +0000 |
commit | 375bb1413c041055262c8a416f20d10474a5eda9 (patch) | |
tree | 66e5d219fe54a005bd13828eaab0234e08ca13fc /lib/Serialization | |
parent | fedb6ecbed93c6bf12a02d61b2421d6f0da3b4fc (diff) |
Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl
covers both declarations (@class) and definitions (@interface) of an
Objective-C class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization')
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 10 | ||||
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 1 | ||||
-rw-r--r-- | lib/Serialization/ASTWriterDecl.cpp | 8 |
3 files changed, 0 insertions, 19 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index 3819191e0c..476f8b5c02 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -279,7 +279,6 @@ namespace clang { void VisitObjCIvarDecl(ObjCIvarDecl *D); void VisitObjCProtocolDecl(ObjCProtocolDecl *D); void VisitObjCAtDefsFieldDecl(ObjCAtDefsFieldDecl *D); - void VisitObjCClassDecl(ObjCClassDecl *D); void VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *D); void VisitObjCCategoryDecl(ObjCCategoryDecl *D); void VisitObjCImplDecl(ObjCImplDecl *D); @@ -782,12 +781,6 @@ void ASTDeclReader::VisitObjCAtDefsFieldDecl(ObjCAtDefsFieldDecl *FD) { VisitFieldDecl(FD); } -void ASTDeclReader::VisitObjCClassDecl(ObjCClassDecl *CD) { - VisitDecl(CD); - CD->Interface = ReadDeclAs<ObjCInterfaceDecl>(Record, Idx); - CD->InterfaceLoc = ReadSourceLocation(Record, Idx); -} - void ASTDeclReader::VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *FPD) { VisitDecl(FPD); unsigned NumProtoRefs = Record[Idx++]; @@ -1944,9 +1937,6 @@ Decl *ASTReader::ReadDeclRecord(DeclID ID) { D = ObjCAtDefsFieldDecl::Create(Context, 0, SourceLocation(), SourceLocation(), 0, QualType(), 0); break; - case DECL_OBJC_CLASS: - D = ObjCClassDecl::Create(Context, 0, SourceLocation()); - break; case DECL_OBJC_FORWARD_PROTOCOL: D = ObjCForwardProtocolDecl::Create(Context, 0, SourceLocation()); break; diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index feeb27f338..1302d538f5 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -865,7 +865,6 @@ void ASTWriter::WriteBlockInfoBlock() { RECORD(DECL_OBJC_PROTOCOL); RECORD(DECL_OBJC_IVAR); RECORD(DECL_OBJC_AT_DEFS_FIELD); - RECORD(DECL_OBJC_CLASS); RECORD(DECL_OBJC_FORWARD_PROTOCOL); RECORD(DECL_OBJC_CATEGORY); RECORD(DECL_OBJC_CATEGORY_IMPL); diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp index 7ae601810b..0692c023e4 100644 --- a/lib/Serialization/ASTWriterDecl.cpp +++ b/lib/Serialization/ASTWriterDecl.cpp @@ -114,7 +114,6 @@ namespace clang { void VisitObjCIvarDecl(ObjCIvarDecl *D); void VisitObjCProtocolDecl(ObjCProtocolDecl *D); void VisitObjCAtDefsFieldDecl(ObjCAtDefsFieldDecl *D); - void VisitObjCClassDecl(ObjCClassDecl *D); void VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *D); void VisitObjCCategoryDecl(ObjCCategoryDecl *D); void VisitObjCImplDecl(ObjCImplDecl *D); @@ -538,13 +537,6 @@ void ASTDeclWriter::VisitObjCAtDefsFieldDecl(ObjCAtDefsFieldDecl *D) { Code = serialization::DECL_OBJC_AT_DEFS_FIELD; } -void ASTDeclWriter::VisitObjCClassDecl(ObjCClassDecl *D) { - VisitDecl(D); - Writer.AddDeclRef(D->Interface, Record); - Writer.AddSourceLocation(D->InterfaceLoc, Record); - Code = serialization::DECL_OBJC_CLASS; -} - void ASTDeclWriter::VisitObjCForwardProtocolDecl(ObjCForwardProtocolDecl *D) { VisitDecl(D); Record.push_back(D->protocol_size()); |