diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-01 21:23:57 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-01 21:23:57 +0000 |
commit | bd9482d859a74bf2c45ef8b8aedec61c0e1c8374 (patch) | |
tree | 827657aa0ed457521e505ae199c93c9166b7181f /lib/AST/DumpXML.cpp | |
parent | a6387f3b447015073192f1e1cafec3ebd0294c8c (diff) |
Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DumpXML.cpp')
-rw-r--r-- | lib/AST/DumpXML.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/AST/DumpXML.cpp b/lib/AST/DumpXML.cpp index 561fb8f372..4ef4ce5e38 100644 --- a/lib/AST/DumpXML.cpp +++ b/lib/AST/DumpXML.cpp @@ -810,17 +810,13 @@ struct XMLDumper : public XMLDeclVisitor<XMLDumper>, } } - // ObjCForwardProtocolDecl - void visitObjCForwardProtocolDeclChildren(ObjCForwardProtocolDecl *D) { - for (ObjCForwardProtocolDecl::protocol_iterator - I = D->protocol_begin(), E = D->protocol_end(); I != E; ++I) - visitDeclRef(*I); - } - // ObjCProtocolDecl void visitObjCProtocolDeclAttrs(ObjCProtocolDecl *D) { } void visitObjCProtocolDeclChildren(ObjCProtocolDecl *D) { + if (!D->isThisDeclarationADefinition()) + return; + if (D->protocol_begin() != D->protocol_end()) { TemporaryContainer C(*this, "protocols"); for (ObjCInterfaceDecl::protocol_iterator @@ -829,6 +825,9 @@ struct XMLDumper : public XMLDeclVisitor<XMLDumper>, } } void visitObjCProtocolDeclAsContext(ObjCProtocolDecl *D) { + if (!D->isThisDeclarationADefinition()) + return; + visitDeclContext(D); } |