[cfe-commits] r52598 - /cfe/trunk/Driver/ASTConsumers.cpp
Chris Lattner
sabre at nondot.org
Sat Jun 21 14:40:21 PDT 2008
Author: lattner
Date: Sat Jun 21 16:40:20 2008
New Revision: 52598
URL: http://llvm.org/viewvc/llvm-project?rev=52598&view=rev
Log:
Implement printing for ObjCClassDecl's, patch by Jean-Daniel Dupas!
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=52598&r1=52597&r2=52598&view=diff
==============================================================================
--- cfe/trunk/Driver/ASTConsumers.cpp (original)
+++ cfe/trunk/Driver/ASTConsumers.cpp Sat Jun 21 16:40:20 2008
@@ -97,8 +97,15 @@
} else if (ObjCCompatibleAliasDecl *OID =
dyn_cast<ObjCCompatibleAliasDecl>(D)) {
PrintObjCCompatibleAliasDecl(OID);
- } else if (isa<ObjCClassDecl>(D)) {
- Out << "@class [printing todo]\n";
+ } else if (ObjCClassDecl *OFCD = dyn_cast<ObjCClassDecl>(D)) {
+ Out << "@class ";
+ ObjCInterfaceDecl **ForwardDecls = OFCD->getForwardDecls();
+ for (unsigned i = 0, e = OFCD->getNumForwardDecls(); i != e; ++i) {
+ const ObjCInterfaceDecl *D = ForwardDecls[i];
+ if (i) Out << ", ";
+ Out << D->getName();
+ }
+ Out << ";\n";
} else if (TagDecl *TD = dyn_cast<TagDecl>(D)) {
Out << "Read top-level tag decl: '" << TD->getName() << "'\n";
} else if (ScopedDecl *SD = dyn_cast<ScopedDecl>(D)) {
More information about the cfe-commits
mailing list