[cfe-commits] r58362 - /cfe/trunk/lib/Analysis/CFRefCount.cpp
Ted Kremenek
kremenek at apple.com
Tue Oct 28 21:07:07 PDT 2008
Author: kremenek
Date: Tue Oct 28 23:07:07 2008
New Revision: 58362
URL: http://llvm.org/viewvc/llvm-project?rev=58362&view=rev
Log:
IOServiceGetMatchingServices is a release function.
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=58362&r1=58361&r2=58362&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Tue Oct 28 23:07:07 2008
@@ -533,7 +533,7 @@
ArgEffect ReceiverEff = DoNothing,
ArgEffect DefaultEff = MayEscape,
bool isEndPath = false);
-
+
RetainSummary* getPersistentSummary(RetEffect RE,
ArgEffect ReceiverEff = DoNothing,
ArgEffect DefaultEff = MayEscape) {
@@ -546,7 +546,7 @@
StopSummary = getPersistentSummary(RetEffect::MakeNoRet(),
StopTracking, StopTracking);
-
+
return StopSummary;
}
@@ -728,6 +728,18 @@
S = getCGSummary(FD, FName );
break;
}
+
+ // FIXME: This should all be refactored into a chain of "summary lookup"
+ // filters.
+ if (strcmp(FName, "IOServiceGetMatchingServices") == 0) {
+ // FIXES: <rdar://problem/6326900>
+ // This should be addressed using a API table. This strcmp is also
+ // a little gross, but there is no need to super optimize here.
+ assert (ScratchArgs.empty());
+ ScratchArgs.push_back(std::make_pair(1, DecRef));
+ S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing);
+ break;
+ }
}
if (FName[0] == 'C') {
More information about the cfe-commits
mailing list