diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-28 22:32:26 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-28 22:32:26 +0000 |
commit | 869292d5b6394e5dbc0e66c7f86705fb1acbc4bb (patch) | |
tree | 92688a4b331d2ab27eb3fa35a45acdcc0ab0f1f8 /clang/lib/Analysis | |
parent | 865efd72b31978d198eb4fd0a229280e1313b7d5 (diff) | |
download | bcm5719-llvm-869292d5b6394e5dbc0e66c7f86705fb1acbc4bb.tar.gz bcm5719-llvm-869292d5b6394e5dbc0e66c7f86705fb1acbc4bb.zip |
Implement ownership attribute 'objc_ownership_make_collectable'. This allows one
to add 'CFMakeCollectable' semantics to a method.
llvm-svn: 70336
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index 538f4f27222..e1483d692d5 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/lib/Analysis/CFRefCount.cpp @@ -1121,6 +1121,10 @@ RetainSummaryManager::getMethodSummaryFromAnnotations(ObjCMethodDecl *MD) { ScratchArgs.push_back(std::make_pair(i, DecRef)); hasArgEffect = true; } + else if ((*I)->getAttr<ObjCOwnershipMakeCollectableAttr>()) { + ScratchArgs.push_back(std::make_pair(i, MakeCollectable)); + hasArgEffect = true; + } } if (!hasRetEffect && !hasArgEffect) |