/// ArgEffect is used to summarize a function/method call's effect on a
/// particular argument.
enum ArgEffect { IncRef, DecRef, DoNothing, StopTracking, MayEscape,
- SelfOwn };
+ SelfOwn, Autorelease };
/// ArgEffects summarizes the effects of a function/method call on all of
/// its arguments.
addNSObjectMethSummary(GetNullarySelector("drain", Ctx), Summ);
// Create the "autorelease" selector.
- Summ = getPersistentSummary(E, isGCEnabled() ? DoNothing : StopTracking);
+ Summ = getPersistentSummary(E, isGCEnabled() ? DoNothing : Autorelease);
addNSObjectMethSummary(GetNullarySelector("autorelease", Ctx), Summ);
// For NSWindow, allocated objects are (initially) self-owned.
default:
assert (false && "Unhandled CFRef transition.");
-
+ case Autorelease:
case MayEscape:
if (V.getKind() == RefVal::Owned) {
V = V ^ RefVal::NotOwned;
}
return B;
-
+
case StopTracking:
return RefBFactory.Remove(B, sym);