diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-12 07:46:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-12 07:46:12 +0000 |
commit | ab4c4d5e5ececa77aae7e291fafcba3049319cdc (patch) | |
tree | ed2ded2c97240e3155e474dc07f3ce12445d8efa /Driver/ASTConsumers.cpp | |
parent | 0157c5144513438bb74aebf50d18f95df4104acb (diff) |
resolve some fixmes and clean up some code by eliminating the get*Vars apis to some classes and use iterators instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/ASTConsumers.cpp')
-rw-r--r-- | Driver/ASTConsumers.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp index 85140bc060..22863411b1 100644 --- a/Driver/ASTConsumers.cpp +++ b/Driver/ASTConsumers.cpp @@ -123,9 +123,10 @@ void DeclPrinter::PrintObjcImplementationDecl(ObjcImplementationDecl *OID) { else Out << "@implementation " << I; - for (int i = 0; i < OID->getNumInstanceMethods(); i++) { - PrintObjcMethodDecl(OID->getInstanceMethods()[i]); - ObjcMethodDecl *OMD = OID->getInstanceMethods()[i]; + for (ObjcImplementationDecl::instmeth_iterator I = OID->instmeth_begin(), + E = OID->instmeth_end(); I != E; ++I) { + ObjcMethodDecl *OMD = *I; + PrintObjcMethodDecl(OMD); if (OMD->getBody()) { Out << ' '; OMD->getBody()->printPretty(Out); @@ -133,9 +134,10 @@ void DeclPrinter::PrintObjcImplementationDecl(ObjcImplementationDecl *OID) { } } - for (int i = 0; i < OID->getNumClassMethods(); i++) { - PrintObjcMethodDecl(OID->getClassMethods()[i]); - ObjcMethodDecl *OMD = OID->getClassMethods()[i]; + for (ObjcImplementationDecl::classmeth_iterator I = OID->classmeth_begin(), + E = OID->classmeth_end(); I != E; ++I) { + ObjcMethodDecl *OMD = *I; + PrintObjcMethodDecl(OMD); if (OMD->getBody()) { Out << ' '; OMD->getBody()->printPretty(Out); |