[cfe-commits] r65127 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/AST/DeclObjC.cpp

Chris Lattner sabre at nondot.org
Fri Feb 20 09:53:36 PST 2009


Author: lattner
Date: Fri Feb 20 11:53:35 2009
New Revision: 65127

URL: http://llvm.org/viewvc/llvm-project?rev=65127&view=rev
Log:
remove a dead list.

Modified:
    cfe/trunk/include/clang/AST/DeclObjC.h
    cfe/trunk/lib/AST/DeclObjC.cpp

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=65127&r1=65126&r2=65127&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Fri Feb 20 11:53:35 2009
@@ -575,10 +575,6 @@
   /// Referenced protocols
   ObjCList<ObjCProtocolDecl> ReferencedProtocols;
   
-  /// protocol properties
-  ObjCPropertyDecl **PropertyDecl;  // Null if no property
-  unsigned NumPropertyDecl;  // 0 if none
-  
   bool isForwardProtoDecl; // declared with @protocol.
   
   SourceLocation EndLoc; // marks the '>' or identifier.
@@ -586,13 +582,10 @@
   
   ObjCProtocolDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id)
     : ObjCContainerDecl(ObjCProtocol, DC, L, Id), 
-      PropertyDecl(0), NumPropertyDecl(0),
       isForwardProtoDecl(true) {
   }
   
-  virtual ~ObjCProtocolDecl() {
-    assert(PropertyDecl == 0 && "Destroy not called?");
-  }
+  virtual ~ObjCProtocolDecl() {}
   
 public:
   static ObjCProtocolDecl *Create(ASTContext &C, DeclContext *DC, 

Modified: cfe/trunk/lib/AST/DeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=65127&r1=65126&r2=65127&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclObjC.cpp (original)
+++ cfe/trunk/lib/AST/DeclObjC.cpp Fri Feb 20 11:53:35 2009
@@ -106,8 +106,7 @@
 }
 
 void ObjCProtocolDecl::Destroy(ASTContext &C) {
-  delete [] PropertyDecl;
-  PropertyDecl = 0;
+  ReferencedProtocols.clear();
   ObjCContainerDecl::Destroy(C);
 }
 





More information about the cfe-commits mailing list