[cfe-commits] r69985 - /cfe/trunk/lib/Analysis/CFRefCount.cpp
Ted Kremenek
kremenek at apple.com
Fri Apr 24 11:19:32 PDT 2009
Author: kremenek
Date: Fri Apr 24 13:19:07 2009
New Revision: 69985
URL: http://llvm.org/viewvc/llvm-project?rev=69985&view=rev
Log:
Minor refactoring: pass selector to getCommonMethodSummary(). No functionality
change.
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=69985&r1=69984&r2=69985&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Fri Apr 24 13:19:07 2009
@@ -721,7 +721,7 @@
RetainSummary* getSummary(FunctionDecl* FD);
RetainSummary* getMethodSummary(ObjCMessageExpr* ME, ObjCInterfaceDecl* ID);
RetainSummary* getClassMethodSummary(ObjCMessageExpr *ME);
- RetainSummary* getCommonMethodSummary(ObjCMessageExpr *ME, const char *s);
+ RetainSummary* getCommonMethodSummary(ObjCMessageExpr *ME, Selector S);
bool isGCEnabled() const { return GCEnabled; }
};
@@ -1074,7 +1074,7 @@
RetainSummary*
-RetainSummaryManager::getCommonMethodSummary(ObjCMessageExpr* ME, const char *s)
+RetainSummaryManager::getCommonMethodSummary(ObjCMessageExpr* ME, Selector S)
{
if (ObjCMethodDecl *MD = ME->getMethodDecl()) {
// Scan the method decl for 'void*' arguments. These should be treated
@@ -1103,7 +1103,7 @@
// by instance methods.
RetEffect E =
- followsFundamentalRule(s)
+ followsFundamentalRule(S.getIdentifierInfoForSlot(0)->getName())
? (isGCEnabled() ? RetEffect::MakeNotOwned(RetEffect::ObjC)
: RetEffect::MakeOwned(RetEffect::ObjC, true))
: RetEffect::MakeNotOwned(RetEffect::ObjC);
@@ -1124,13 +1124,13 @@
return I->second;
// "initXXX": pass-through for receiver.
- const char* s = S.getIdentifierInfoForSlot(0)->getName();
assert(ScratchArgs.empty());
- if (deriveNamingConvention(s) == InitRule)
+ if (deriveNamingConvention(S.getIdentifierInfoForSlot(0)->getName())
+ == InitRule)
return getInitMethodSummary(ME);
- RetainSummary *Summ = getCommonMethodSummary(ME, s);
+ RetainSummary *Summ = getCommonMethodSummary(ME, S);
ObjCMethodSummaries[ME] = Summ;
return Summ;
}
@@ -1156,9 +1156,7 @@
if (I != ObjCClassMethodSummaries.end())
return I->second;
- RetainSummary* Summ =
- getCommonMethodSummary(ME, S.getIdentifierInfoForSlot(0)->getName());
-
+ RetainSummary* Summ = getCommonMethodSummary(ME, S);
ObjCClassMethodSummaries[ObjCSummaryKey(ME->getClassName(), S)] = Summ;
return Summ;
}
More information about the cfe-commits
mailing list