summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DumpXML.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-01 21:23:57 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-01 21:23:57 +0000
commitf61026758145df2f845f9c28e89f53c084d35cb2 (patch)
tree24699428a99f060286b52844b9d54089e363da38 /clang/lib/AST/DumpXML.cpp
parentc51118238c9a05a3113ce0057bb10169b583a6c5 (diff)
downloadbcm5719-llvm-f61026758145df2f845f9c28e89f53c084d35cb2.tar.gz
bcm5719-llvm-f61026758145df2f845f9c28e89f53c084d35cb2.zip
Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly. llvm-svn: 147415
Diffstat (limited to 'clang/lib/AST/DumpXML.cpp')
-rw-r--r--clang/lib/AST/DumpXML.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/AST/DumpXML.cpp b/clang/lib/AST/DumpXML.cpp
index 561fb8f372d..4ef4ce5e382 100644
--- a/clang/lib/AST/DumpXML.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud