diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-17 22:43:44 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-17 22:43:44 +0000 |
commit | 61991903335144605031c3597a5c99e1565b0bd4 (patch) | |
tree | 8c5c210fd7ba719e9d06b823f9c4f1243669bc93 /lib/Analysis/CFRefCount.cpp | |
parent | aae82f1a9110db0069bc61ec018dafe14e062872 (diff) |
Stub out some code for support for NSDeallocateObject. This is enabled yet until
we resolve the semantics of this function when GC is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 7382e1a7ac..8b3ad8ddab 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -867,6 +867,18 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) { S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing); break; } + + // Enable this code once the semantics of NSDeallocateObject are resolved + // for GC. <rdar://problem/6619988> +#if 0 + // Handle: NSDeallocateObject(id anObject); + // This method does allow 'nil' (although we don't check it now). + if (strcmp(FName, "NSDeallocateObject") == 0) { + return RetTy == Ctx.VoidTy + ? getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, Dealloc) + : getPersistentStopSummary(); + } +#endif // Handle: id NSMakeCollectable(CFTypeRef) if (strcmp(FName, "NSMakeCollectable") == 0) { |