summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-cc/clang-cc.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-30 00:08:05 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-30 00:08:05 +0000
commit278f52ec29642d6a0ae40f4518e3f67387ee4cfb (patch)
treedc01edd5515e3be87e9afbd071cc8cfe8a97143f /clang/tools/clang-cc/clang-cc.cpp
parent01bcef4a17131b08fd6cf8f7bdaa4b8456dd63f8 (diff)
downloadbcm5719-llvm-278f52ec29642d6a0ae40f4518e3f67387ee4cfb.tar.gz
bcm5719-llvm-278f52ec29642d6a0ae40f4518e3f67387ee4cfb.zip
Refactor and clean up the AST printer, so that it uses a DeclVisitor,
walks through DeclContexts properly, and prints more of the information available in the AST. The functionality is still available via -ast-print, -ast-dump, etc., and also via the new member functions Decl::dump() and Decl::print(). llvm-svn: 72597
Diffstat (limited to 'clang/tools/clang-cc/clang-cc.cpp')
-rw-r--r--clang/tools/clang-cc/clang-cc.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/tools/clang-cc/clang-cc.cpp b/clang/tools/clang-cc/clang-cc.cpp
index 1503937afa6..a0ccafa9afc 100644
--- a/clang/tools/clang-cc/clang-cc.cpp
+++ b/clang/tools/clang-cc/clang-cc.cpp
@@ -196,8 +196,6 @@ enum ProgActions {
ASTPrint, // Parse ASTs and print them.
ASTPrintXML, // Parse ASTs and print them in XML.
ASTDump, // Parse ASTs and dump them.
- ASTDumpFull, // Parse ASTs and dump them, including the
- // contents of a PCH file.
ASTView, // Parse ASTs and view them in Graphviz.
PrintDeclContext, // Print DeclContext and their Decls.
ParsePrintCallbacks, // Parse and print each callback.
@@ -241,8 +239,6 @@ ProgAction(llvm::cl::desc("Choose output type:"), llvm::cl::ZeroOrMore,
"Build ASTs and then print them in XML format"),
clEnumValN(ASTDump, "ast-dump",
"Build ASTs and then debug dump them"),
- clEnumValN(ASTDumpFull, "ast-dump-full",
- "Build ASTs and then debug dump them, including PCH"),
clEnumValN(ASTView, "ast-view",
"Build ASTs and view them with GraphViz"),
clEnumValN(PrintDeclContext, "print-decl-contexts",
@@ -1770,15 +1766,11 @@ static void ProcessInputFile(Preprocessor &PP, PreprocessorFactory &PPF,
break;
case ASTDump:
- Consumer.reset(CreateASTDumper(false));
+ Consumer.reset(CreateASTDumper());
break;
- case ASTDumpFull:
- Consumer.reset(CreateASTDumper(true));
- break;
-
case ASTView:
- Consumer.reset(CreateASTViewer());
+ Consumer.reset(CreateASTViewer());
break;
case PrintDeclContext:
OpenPOWER on IntegriCloud