From 1c28331b57df1b99af4ff5dcb409cafbe171795c Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 11 Aug 2010 12:19:30 +0000 Subject: Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition," which appears to be causing significant Objective-C breakage. llvm-svn: 110803 --- clang/lib/AST/DeclPrinter.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'clang/lib/AST/DeclPrinter.cpp') diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index d3ebc8f508e..fae1e724a17 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -727,19 +727,12 @@ void DeclPrinter::VisitObjCImplementationDecl(ObjCImplementationDecl *OID) { void DeclPrinter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *OID) { std::string I = OID->getNameAsString(); - - if (OID->isForwardDecl()) { - // These shouldn't be directly visited, but in case they are, write them - // as an @class declaration. - Out << "@class " << I; - return; - } - ObjCInterfaceDecl *SID = OID->getSuperClass(); - Out << "@interface " << I; if (SID) - Out << " : " << SID; + Out << "@interface " << I << " : " << SID; + else + Out << "@interface " << I; // Protocols? const ObjCList &Protocols = OID->getReferencedProtocols(); -- cgit v1.2.3