[cfe-commits] r43382 - /cfe/trunk/Driver/ASTConsumers.cpp

Fariborz Jahanian fjahanian at apple.com
Fri Oct 26 09:29:12 PDT 2007


Author: fjahanian
Date: Fri Oct 26 11:29:12 2007
New Revision: 43382

URL: http://llvm.org/viewvc/llvm-project?rev=43382&view=rev
Log:
Pretty printing for ivar list of an interface block.

Modified:
    cfe/trunk/Driver/ASTConsumers.cpp

Modified: cfe/trunk/Driver/ASTConsumers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/ASTConsumers.cpp?rev=43382&r1=43381&r2=43382&view=diff

==============================================================================
--- cfe/trunk/Driver/ASTConsumers.cpp (original)
+++ cfe/trunk/Driver/ASTConsumers.cpp Fri Oct 26 11:29:12 2007
@@ -91,9 +91,22 @@
               refProtocols[i]->getName());
   }
   if (count > 0)
-    fprintf(stderr, ">;\n");
+    fprintf(stderr, ">\n");
   else
-    fprintf(stderr, ";\n");
+    fprintf(stderr, "\n");
+  
+  int NumIvars = OID->getIntfDeclNumIvars();
+  if (NumIvars > 0) {
+    ObjcIvarDecl **Ivars = OID->getIntfDeclIvars();
+    fprintf(stderr,"{");
+    for (int i = 0; i < NumIvars; i++) {
+      fprintf(stderr, "\t%s %s;\n", Ivars[i]->getType().getAsString().c_str(),
+              Ivars[i]->getName());
+    }
+    fprintf(stderr, "}\n at end\n");
+  }
+  else
+    fprintf(stderr,"@end\n");
   // FIXME: implement the rest...
 }
 





More information about the cfe-commits mailing list