diff options
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 16 |
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') { |