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
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index 2286341..790baf5 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -172,14 +172,12 @@
else
Out << '\n';
- int NumIvars = OID->getNumInstanceVariables();
- if (NumIvars > 0) {
- ObjcIvarDecl **Ivars = OID->getInstanceVariables();
+ if (OID->getNumInstanceVariables() > 0) {
Out << '{';
- for (int i = 0; i < NumIvars; i++) {
- Out << '\t' << Ivars[i]->getType().getAsString()
- << ' ' << Ivars[i]->getName()
- << ";\n";
+ for (ObjcInterfaceDecl::ivar_iterator I = OID->ivar_begin(),
+ E = OID->ivar_end(); I != E; ++I) {
+ Out << '\t' << (*I)->getType().getAsString()
+ << ' ' << (*I)->getName() << ";\n";
}
Out << "}\n";
}