summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/RewriteBlocks.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/Frontend/RewriteBlocks.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/Frontend/RewriteBlocks.cpp')
-rw-r--r--clang/lib/Frontend/RewriteBlocks.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/clang/lib/Frontend/RewriteBlocks.cpp b/clang/lib/Frontend/RewriteBlocks.cpp
index 29590de851d..bc855fa8791 100644
--- a/clang/lib/Frontend/RewriteBlocks.cpp
+++ b/clang/lib/Frontend/RewriteBlocks.cpp
@@ -306,39 +306,33 @@ void RewriteBlocks::RewriteMethodDecl(ObjCMethodDecl *Method) {
void RewriteBlocks::RewriteInterfaceDecl(ObjCInterfaceDecl *ClassDecl) {
for (ObjCInterfaceDecl::instmeth_iterator
- I = ClassDecl->instmeth_begin(*Context),
- E = ClassDecl->instmeth_end(*Context);
+ I = ClassDecl->instmeth_begin(), E = ClassDecl->instmeth_end();
I != E; ++I)
RewriteMethodDecl(*I);
for (ObjCInterfaceDecl::classmeth_iterator
- I = ClassDecl->classmeth_begin(*Context),
- E = ClassDecl->classmeth_end(*Context);
+ I = ClassDecl->classmeth_begin(), E = ClassDecl->classmeth_end();
I != E; ++I)
RewriteMethodDecl(*I);
}
void RewriteBlocks::RewriteCategoryDecl(ObjCCategoryDecl *CatDecl) {
for (ObjCCategoryDecl::instmeth_iterator
- I = CatDecl->instmeth_begin(*Context),
- E = CatDecl->instmeth_end(*Context);
+ I = CatDecl->instmeth_begin(), E = CatDecl->instmeth_end();
I != E; ++I)
RewriteMethodDecl(*I);
for (ObjCCategoryDecl::classmeth_iterator
- I = CatDecl->classmeth_begin(*Context),
- E = CatDecl->classmeth_end(*Context);
+ I = CatDecl->classmeth_begin(), E = CatDecl->classmeth_end();
I != E; ++I)
RewriteMethodDecl(*I);
}
void RewriteBlocks::RewriteProtocolDecl(ObjCProtocolDecl *PDecl) {
for (ObjCProtocolDecl::instmeth_iterator
- I = PDecl->instmeth_begin(*Context),
- E = PDecl->instmeth_end(*Context);
+ I = PDecl->instmeth_begin(), E = PDecl->instmeth_end();
I != E; ++I)
RewriteMethodDecl(*I);
for (ObjCProtocolDecl::classmeth_iterator
- I = PDecl->classmeth_begin(*Context),
- E = PDecl->classmeth_end(*Context);
+ I = PDecl->classmeth_begin(), E = PDecl->classmeth_end();
I != E; ++I)
RewriteMethodDecl(*I);
}
@@ -1147,8 +1141,8 @@ void RewriteBlocks::HandleDeclInMainFile(Decl *D) {
}
if (RecordDecl *RD = dyn_cast<RecordDecl>(D)) {
if (RD->isDefinition()) {
- for (RecordDecl::field_iterator i = RD->field_begin(*Context),
- e = RD->field_end(*Context); i != e; ++i) {
+ for (RecordDecl::field_iterator i = RD->field_begin(),
+ e = RD->field_end(); i != e; ++i) {
FieldDecl *FD = *i;
if (isBlockPointerType(FD->getType()))
RewriteBlockPointerDecl(FD);
OpenPOWER on IntegriCloud