remove some more methods from objc decls, using the iterator
interfaces more consistently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65138 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index b8c74e1..9ed6251 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -1858,10 +1858,10 @@
   // The first two arguments (self and _cmd) are pointers; account for
   // their size.
   int ParmOffset = 2 * PtrSize;
-  int NumOfParams = Decl->getNumParams();
-  for (int i = 0; i < NumOfParams; i++) {
-    QualType PType = Decl->getParamDecl(i)->getType();
-    int sz = getObjCEncodingTypeSize (PType);
+  for (ObjCMethodDecl::param_iterator PI = Decl->param_begin(),
+       E = Decl->param_end(); PI != E; ++PI) {
+    QualType PType = (*PI)->getType();
+    int sz = getObjCEncodingTypeSize(PType);
     assert (sz > 0 && "getObjCEncodingForMethodDecl - Incomplete param type");
     ParmOffset += sz;
   }
@@ -1871,8 +1871,9 @@
   
   // Argument types.
   ParmOffset = 2 * PtrSize;
-  for (int i = 0; i < NumOfParams; i++) {
-    ParmVarDecl *PVDecl = Decl->getParamDecl(i);
+  for (ObjCMethodDecl::param_iterator PI = Decl->param_begin(),
+       E = Decl->param_end(); PI != E; ++PI) {
+    ParmVarDecl *PVDecl = *PI;
     QualType PType = PVDecl->getOriginalType(); 
     if (const ArrayType *AT =
           dyn_cast<ArrayType>(PType->getCanonicalTypeInternal()))