summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-06-30 02:36:12 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-06-30 02:36:12 +0000
commitcfbfe78e9e4a5b95196361a0038e839889ea2257 (patch)
treeb7432ee1195c0fe35ee86eb00bd63b25480a457f /clang/lib/Analysis/CFRefCount.cpp
parente3d025995c4408b8ab2b717c5f08f1f9d967b6f4 (diff)
downloadbcm5719-llvm-cfbfe78e9e4a5b95196361a0038e839889ea2257.tar.gz
bcm5719-llvm-cfbfe78e9e4a5b95196361a0038e839889ea2257.zip
De-ASTContext-ify DeclContext.
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index 619dbe537df..3cca482633c 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/lib/Analysis/CFRefCount.cpp
@@ -156,13 +156,13 @@ static bool followsFundamentalRule(Selector S) {
}
static const ObjCMethodDecl*
-ResolveToInterfaceMethodDecl(const ObjCMethodDecl *MD, ASTContext &Context) {
+ResolveToInterfaceMethodDecl(const ObjCMethodDecl *MD) {
ObjCInterfaceDecl *ID =
const_cast<ObjCInterfaceDecl*>(MD->getClassInterface());
return MD->isInstanceMethod()
- ? ID->lookupInstanceMethod(Context, MD->getSelector())
- : ID->lookupClassMethod(Context, MD->getSelector());
+ ? ID->lookupInstanceMethod(MD->getSelector())
+ : ID->lookupClassMethod(MD->getSelector());
}
namespace {
@@ -827,8 +827,7 @@ public:
QualType ResultTy = MD->getResultType();
// Resolve the method decl last.
- if (const ObjCMethodDecl *InterfaceMD =
- ResolveToInterfaceMethodDecl(MD, Ctx))
+ if (const ObjCMethodDecl *InterfaceMD = ResolveToInterfaceMethodDecl(MD))
MD = InterfaceMD;
if (MD->isInstanceMethod())
@@ -2857,8 +2856,8 @@ void CFRefCount::EvalSummary(ExplodedNodeSet<GRState>& Dst,
state->getStateManager().getRegionManager();
// Iterate through the fields and construct new symbols.
- for (RecordDecl::field_iterator FI=RD->field_begin(Ctx),
- FE=RD->field_end(Ctx); FI!=FE; ++FI) {
+ for (RecordDecl::field_iterator FI=RD->field_begin(),
+ FE=RD->field_end(); FI!=FE; ++FI) {
// For now just handle scalar fields.
FieldDecl *FD = *FI;
OpenPOWER on IntegriCloud