diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-03-07 01:03:30 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-03-07 01:03:30 +0000 |
commit | e6ec11aa15c7104d57009c6e036bf4ae29c35fb2 (patch) | |
tree | ba116415fcaa54fd7f1ed765896b1b156c17333f /lib/Frontend/ASTConsumers.cpp | |
parent | 951c5705771a57eca0bca07aae5d4738619dd6c6 (diff) |
Remove the AST printer (-ast-print-xml), which is too incomplete and
too low-level to actually be useful but is just interesting enough for
people to try to use it (which won't actually work beyond toy examples).
To bring back the AST printer, it needs to be:
- Complete, covering all of C/C++/Objective-C
- Documented, with appropriate Schema against which we can validate
the output
- Designed for C/C++/Objective-C, not Clang's specific ASTs
- Stable across Clang versions
- Well-tested
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127141 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTConsumers.cpp')
-rw-r--r-- | lib/Frontend/ASTConsumers.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/Frontend/ASTConsumers.cpp b/lib/Frontend/ASTConsumers.cpp index 92fb1e8cbe..f198d955e8 100644 --- a/lib/Frontend/ASTConsumers.cpp +++ b/lib/Frontend/ASTConsumers.cpp @@ -12,7 +12,6 @@ //===----------------------------------------------------------------------===// #include "clang/Frontend/ASTConsumers.h" -#include "clang/Frontend/DocumentXML.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/FileManager.h" @@ -51,39 +50,6 @@ ASTConsumer *clang::CreateASTPrinter(llvm::raw_ostream* out) { return new ASTPrinter(out); } -//===----------------------------------------------------------------------===// -/// ASTPrinterXML - XML-printer of ASTs - -namespace { - class ASTPrinterXML : public ASTConsumer { - DocumentXML Doc; - - public: - ASTPrinterXML(llvm::raw_ostream& o) : Doc("CLANG_XML", o) {} - - void Initialize(ASTContext &Context) { - Doc.initialize(Context); - } - - virtual void HandleTranslationUnit(ASTContext &Ctx) { - Doc.addSubNode("TranslationUnit"); - for (DeclContext::decl_iterator - D = Ctx.getTranslationUnitDecl()->decls_begin(), - DEnd = Ctx.getTranslationUnitDecl()->decls_end(); - D != DEnd; - ++D) - Doc.PrintDecl(*D); - Doc.toParent(); - Doc.finalize(); - } - }; -} // end anonymous namespace - - -ASTConsumer *clang::CreateASTPrinterXML(llvm::raw_ostream* out) { - return new ASTPrinterXML(out ? *out : llvm::outs()); -} - ASTConsumer *clang::CreateASTDumper() { return new ASTPrinter(0, true); } |