summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-06-06 17:21:42 +0000
committerTed Kremenek <kremenek@apple.com>2008-06-06 17:21:42 +0000
commit5144fe2287af6cb701d49e37049aa72088a3ce17 (patch)
treed39742984182205baf8d9d79d489da3b0dc61288 /clang/lib/AST/DeclObjC.cpp
parent09a0d04ea02be6ca0aca13a38c2b6f859c5f455c (diff)
downloadbcm5719-llvm-5144fe2287af6cb701d49e37049aa72088a3ce17.tar.gz
bcm5719-llvm-5144fe2287af6cb701d49e37049aa72088a3ce17.zip
Because of a lack of a clear ownership role between ObjCInterfaceDecls and
ObjCPropertyDecls, have TranslationUnit destroy ObjCPropertyDecls. This is a horrible hack, and must be removed eventually. llvm-svn: 52051
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r--clang/lib/AST/DeclObjC.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index f3d81a1aa50..b3fc131330e 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -79,13 +79,11 @@ void ObjCInterfaceDecl::Destroy(ASTContext& C) {
for (classmeth_iterator I=classmeth_begin(), E=classmeth_end(); I!=E; ++I)
if (*I) (*I)->Destroy(C);
-
- // FIXME: Cannot destroy properties right now because the properties of
- // both the super class and this class are in this array. This can
- // cause double-deletions.
- //for (classprop_iterator I=classprop_begin(), E=classprop_end(); I!=E; ++I)
-// if (*I) (*I)->Destroy(C);
-//
+
+ // FIXME: Because there is no clear ownership
+ // role between ObjCInterfaceDecls and the ObjCPropertyDecls that they
+ // reference, we destroy ObjCPropertyDecls in ~TranslationUnit.
+
Decl::Destroy(C);
}
OpenPOWER on IntegriCloud