[cfe-commits] r67116 - /cfe/trunk/lib/Analysis/CFRefCount.cpp

Ted Kremenek kremenek at apple.com
Tue Mar 17 15:43:44 PDT 2009


Author: kremenek
Date: Tue Mar 17 17:43:44 2009
New Revision: 67116

URL: http://llvm.org/viewvc/llvm-project?rev=67116&view=rev
Log:
Stub out some code for support for NSDeallocateObject. This is enabled yet until
we resolve the semantics of this function when GC is enabled.

Modified:
    cfe/trunk/lib/Analysis/CFRefCount.cpp

Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=67116&r1=67115&r2=67116&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Tue Mar 17 17:43:44 2009
@@ -867,6 +867,18 @@
       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) {





More information about the cfe-commits mailing list