summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/Driver/ASTConsumers.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/Driver/ASTConsumers.cpp b/clang/Driver/ASTConsumers.cpp
index 92add4195e2..1383a5ed5d2 100644
--- a/clang/Driver/ASTConsumers.cpp
+++ b/clang/Driver/ASTConsumers.cpp
@@ -97,8 +97,15 @@ void DeclPrinter:: PrintDecl(Decl *D) {
} 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)) {
OpenPOWER on IntegriCloud