Implement printing for ObjCClassDecl's, patch by Jean-Daniel Dupas!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52598 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-06-21 21:40:20 +00:00
Родитель 18ae3cfe2a
Коммит 23a0e45540
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -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)) {