[cfe-commits] r52650 - in /cfe/trunk: clang.xcodeproj/project.pbxproj lib/Analysis/CFRefCount.cpp
Ted Kremenek
kremenek at apple.com
Mon Jun 23 15:21:20 PDT 2008
Author: kremenek
Date: Mon Jun 23 17:21:20 2008
New Revision: 52650
URL: http://llvm.org/viewvc/llvm-project?rev=52650&view=rev
Log:
Rename summary methods for "instance methods" to "class methods" (the names got screwed up). No functionality change.
Modified:
cfe/trunk/clang.xcodeproj/project.pbxproj
cfe/trunk/lib/Analysis/CFRefCount.cpp
Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=52650&r1=52649&r2=52650&view=diff
==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Mon Jun 23 17:21:20 2008
@@ -1168,6 +1168,7 @@
1DEB923608733DC60010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ GCC_VERSION = 4.2;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=52650&r1=52649&r2=52650&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Mon Jun 23 17:21:20 2008
@@ -232,7 +232,7 @@
FuncSummariesTy;
typedef llvm::DenseMap<Selector, RetainSummary*>
- ObjCMethSummariesTy;
+ ObjCMethodSummariesTy;
//==-----------------------------------------------------------------==//
// Data.
@@ -250,12 +250,12 @@
// FuncSummaries - A map from FunctionDecls to summaries.
FuncSummariesTy FuncSummaries;
- // ObjCInstMethSummaries - A map from selectors (for instance methods)
+ // ObjCClassMethodSummaries - A map from selectors (for instance methods)
// to summaries.
- ObjCMethSummariesTy ObjCInstMethSummaries;
+ ObjCMethodSummariesTy ObjCClassMethodSummaries;
- // ObjCMethSummaries - A map from selectors to summaries.
- ObjCMethSummariesTy ObjCMethSummaries;
+ // ObjCMethodSummaries - A map from selectors to summaries.
+ ObjCMethodSummariesTy ObjCMethodSummaries;
// ArgEffectsSet - A FoldingSet of uniqued ArgEffects.
ArgEffectsSetTy ArgEffectsSet;
@@ -311,16 +311,16 @@
RetainSummary* getInitMethodSummary(Selector S);
- void InitializeInstMethSummaries();
- void InitializeMethSummaries();
+ void InitializeClassMethodSummaries();
+ void InitializeMethodSummaries();
public:
RetainSummaryManager(ASTContext& ctx, bool gcenabled)
: Ctx(ctx), GCEnabled(gcenabled), StopSummary(0) {
- InitializeInstMethSummaries();
- InitializeMethSummaries();
+ InitializeClassMethodSummaries();
+ InitializeMethodSummaries();
}
~RetainSummaryManager();
@@ -328,7 +328,7 @@
RetainSummary* getSummary(FunctionDecl* FD, ASTContext& Ctx);
RetainSummary* getMethodSummary(ObjCMessageExpr* ME);
- RetainSummary* getInstanceMethodSummary(IdentifierInfo* ClsName, Selector S);
+ RetainSummary* getClassMethodSummary(IdentifierInfo* ClsName, Selector S);
bool isGCEnabled() const { return GCEnabled; }
};
@@ -575,7 +575,7 @@
RetainSummary* Summ =
getPersistentSummary(RetEffect::MakeReceiverAlias());
- ObjCMethSummaries[S] = Summ;
+ ObjCMethodSummaries[S] = Summ;
return Summ;
}
@@ -585,9 +585,9 @@
Selector S = ME->getSelector();
// Look up a summary in our cache of Selectors -> Summaries.
- ObjCMethSummariesTy::iterator I = ObjCMethSummaries.find(S);
+ ObjCMethodSummariesTy::iterator I = ObjCMethodSummaries.find(S);
- if (I != ObjCMethSummaries.end())
+ if (I != ObjCMethodSummaries.end())
return I->second;
#if 0
@@ -596,7 +596,7 @@
if (!isNSType(ME->getReceiver()->getType())) {
RetainSummary* Summ = getPersistentStopSummary();
- ObjCMethSummaries[S] = Summ;
+ ObjCMethodSummaries[S] = Summ;
return Summ;
}
#endif
@@ -624,7 +624,7 @@
: RetEffect::MakeOwned(true);
RetainSummary* Summ = getPersistentSummary(E);
- ObjCMethSummaries[S] = Summ;
+ ObjCMethodSummaries[S] = Summ;
return Summ;
}
@@ -632,19 +632,19 @@
}
RetainSummary*
-RetainSummaryManager::getInstanceMethodSummary(IdentifierInfo* ClsName,
- Selector S) {
+RetainSummaryManager::getClassMethodSummary(IdentifierInfo* ClsName,
+ Selector S) {
// Look up a summary in our cache of Selectors -> Summaries.
- ObjCMethSummariesTy::iterator I = ObjCInstMethSummaries.find(S);
+ ObjCMethodSummariesTy::iterator I = ObjCClassMethodSummaries.find(S);
- if (I != ObjCInstMethSummaries.end())
+ if (I != ObjCClassMethodSummaries.end())
return I->second;
return 0;
}
-void RetainSummaryManager::InitializeInstMethSummaries() {
+void RetainSummaryManager::InitializeClassMethodSummaries() {
assert (ScratchArgs.empty());
@@ -654,23 +654,23 @@
RetainSummary* Summ = getPersistentSummary(E);
// Create the "alloc" selector.
- ObjCInstMethSummaries[ GetNullarySelector("alloc", Ctx) ] = Summ;
+ ObjCClassMethodSummaries[ GetNullarySelector("alloc", Ctx) ] = Summ;
// Create the "new" selector.
- ObjCInstMethSummaries[ GetNullarySelector("new", Ctx) ] = Summ;
+ ObjCClassMethodSummaries[ GetNullarySelector("new", Ctx) ] = Summ;
// Create the "allocWithZone:" selector.
- ObjCInstMethSummaries[ GetUnarySelector("allocWithZone", Ctx) ] = Summ;
+ ObjCClassMethodSummaries[ GetUnarySelector("allocWithZone", Ctx) ] = Summ;
}
-void RetainSummaryManager::InitializeMethSummaries() {
+void RetainSummaryManager::InitializeMethodSummaries() {
assert (ScratchArgs.empty());
// Create the "init" selector. It just acts as a pass-through for the
// receiver.
RetainSummary* Summ = getPersistentSummary(RetEffect::MakeReceiverAlias());
- ObjCMethSummaries[ GetNullarySelector("init", Ctx) ] = Summ;
+ ObjCMethodSummaries[ GetNullarySelector("init", Ctx) ] = Summ;
// The next methods are allocators.
RetEffect E = isGCEnabled() ? RetEffect::MakeNoRet()
@@ -679,27 +679,27 @@
Summ = getPersistentSummary(E);
// Create the "copy" selector.
- ObjCMethSummaries[ GetNullarySelector("copy", Ctx) ] = Summ;
+ ObjCMethodSummaries[ GetNullarySelector("copy", Ctx) ] = Summ;
// Create the "mutableCopy" selector.
- ObjCMethSummaries[ GetNullarySelector("mutableCopy", Ctx) ] = Summ;
+ ObjCMethodSummaries[ GetNullarySelector("mutableCopy", Ctx) ] = Summ;
// Create the "retain" selector.
E = RetEffect::MakeReceiverAlias();
Summ = getPersistentSummary(E, isGCEnabled() ? DoNothing : IncRef);
- ObjCMethSummaries[ GetNullarySelector("retain", Ctx) ] = Summ;
+ ObjCMethodSummaries[ GetNullarySelector("retain", Ctx) ] = Summ;
// Create the "release" selector.
Summ = getPersistentSummary(E, isGCEnabled() ? DoNothing : DecRef);
- ObjCMethSummaries[ GetNullarySelector("release", Ctx) ] = Summ;
+ ObjCMethodSummaries[ GetNullarySelector("release", Ctx) ] = Summ;
// Create the "drain" selector.
Summ = getPersistentSummary(E, isGCEnabled() ? DoNothing : DecRef);
- ObjCMethSummaries[ GetNullarySelector("drain", Ctx) ] = Summ;
+ ObjCMethodSummaries[ GetNullarySelector("drain", Ctx) ] = Summ;
// Create the "autorelease" selector.
Summ = getPersistentSummary(E, isGCEnabled() ? DoNothing : StopTracking);
- ObjCMethSummaries[ GetNullarySelector("autorelease", Ctx) ] = Summ;
+ ObjCMethodSummaries[ GetNullarySelector("autorelease", Ctx) ] = Summ;
}
//===----------------------------------------------------------------------===//
@@ -1284,8 +1284,8 @@
if (ME->getReceiver())
Summ = Summaries.getMethodSummary(ME);
else
- Summ = Summaries.getInstanceMethodSummary(ME->getClassName(),
- ME->getSelector());
+ Summ = Summaries.getClassMethodSummary(ME->getClassName(),
+ ME->getSelector());
EvalSummary(Dst, Eng, Builder, ME, ME->getReceiver(), Summ,
ME->arg_begin(), ME->arg_end(), Pred);
More information about the cfe-commits
mailing list