aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/DeclObjC.h9
-rw-r--r--lib/AST/DeclObjC.cpp3
2 files changed, 2 insertions, 10 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index dd6856f32c..d7abcaaa62 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -575,10 +575,6 @@ class ObjCProtocolDecl : public ObjCContainerDecl {
/// 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 @@ class ObjCProtocolDecl : public ObjCContainerDecl {
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,
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 1651df9141..5b59af9d95 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -106,8 +106,7 @@ ObjCProtocolDecl *ObjCProtocolDecl::Create(ASTContext &C, DeclContext *DC,
}
void ObjCProtocolDecl::Destroy(ASTContext &C) {
- delete [] PropertyDecl;
- PropertyDecl = 0;
+ ReferencedProtocols.clear();
ObjCContainerDecl::Destroy(C);
}