diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-06-30 02:36:12 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-06-30 02:36:12 +0000 |
commit | 17945a0f64fe03ff6ec0c2146005a87636e3ac12 (patch) | |
tree | 76e53886f0d07ed0cd801ee8820e3f0abca65991 /lib/Analysis/CFRefCount.cpp | |
parent | 048f30a483ca352ee7f235a5be181b9dcc5f9d9c (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 619dbe537d..3cca482633 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/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; |