aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-11 12:19:30 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-11 12:19:30 +0000
commitdeacbdca554298ccdf636f19c6094a8825ec6b34 (patch)
treea25e20608fe132a81d48e79b4f1e09dab5936e16 /lib/AST/DeclPrinter.cpp
parent018220c343c103b7dfaa117a7a474c7a7fd6d068 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclPrinter.cpp')
-rw-r--r--lib/AST/DeclPrinter.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp
index d3ebc8f508..fae1e724a1 100644
--- a/lib/AST/DeclPrinter.cpp
+++ b/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<ObjCProtocolDecl> &Protocols = OID->getReferencedProtocols();