diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-12 07:56:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-12 07:56:42 +0000 |
commit | be6df088d69bca0e99c7845a6cd8c1ca85034f31 (patch) | |
tree | c43f73508ecc8ce36be7973df49961b691f8e0ff /AST/Decl.cpp | |
parent | ab4c4d5e5ececa77aae7e291fafcba3049319cdc (diff) |
more cleanups changing things like getInstanceVariables to iterators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'AST/Decl.cpp')
-rw-r--r-- | AST/Decl.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/AST/Decl.cpp b/AST/Decl.cpp index 1e3636c2d5..f986c63014 100644 --- a/AST/Decl.cpp +++ b/AST/Decl.cpp @@ -393,12 +393,11 @@ ObjcIvarDecl *ObjcInterfaceDecl::lookupInstanceVariable( IdentifierInfo *ID, ObjcInterfaceDecl *&clsDeclared) { ObjcInterfaceDecl* ClassDecl = this; while (ClassDecl != NULL) { - ObjcIvarDecl **ivars = ClassDecl->getInstanceVariables(); - int ivarCount = ClassDecl->getNumInstanceVariables(); - for (int i = 0; i < ivarCount; ++i) { - if (ivars[i]->getIdentifier() == ID) { + for (ivar_iterator I = ClassDecl->ivar_begin(), E = ClassDecl->ivar_end(); + I != E; ++I) { + if ((*I)->getIdentifier() == ID) { clsDeclared = ClassDecl; - return ivars[i]; + return *I; } } ClassDecl = ClassDecl->getSuperClass(); |