Make sure method definitions get output with -ast-dump.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51494 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index 3276228..3383dd3 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -462,6 +462,11 @@
} else if (ObjCMethodDecl* MD = dyn_cast<ObjCMethodDecl>(D)) {
Out << "Read objc method decl: '" << MD->getSelector().getName()
<< "'\n";
+ if (MD->getBody()) {
+ // FIXME: convert dumper to use std::ostream?
+ MD->getBody()->dumpAll(*SM);
+ Out << '\n';
+ }
} else if (isa<ObjCImplementationDecl>(D)) {
Out << "Read objc implementation decl\n";
}