aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-10-29 04:07:07 +0000
committerTed Kremenek <kremenek@apple.com>2008-10-29 04:07:07 +0000
commit706522f1d5c1545a074ed336fb3fd72f005c367e (patch)
tree0099e21a4cda2656e7782980b14ee0fae422425e
parent8e8f3b7f61548391b675831f350b4ede040dfdce (diff)
IOServiceGetMatchingServices is a release function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58362 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/CFRefCount.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 21c2ecf4b9..fe7a198970 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -533,7 +533,7 @@ public:
ArgEffect ReceiverEff = DoNothing,
ArgEffect DefaultEff = MayEscape,
bool isEndPath = false);
-
+
RetainSummary* getPersistentSummary(RetEffect RE,
ArgEffect ReceiverEff = DoNothing,
ArgEffect DefaultEff = MayEscape) {
@@ -546,7 +546,7 @@ public:
StopSummary = getPersistentSummary(RetEffect::MakeNoRet(),
StopTracking, StopTracking);
-
+
return StopSummary;
}
@@ -728,6 +728,18 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) {
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') {