aboutsummaryrefslogtreecommitdiff
path: root/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
commit4fe0c8e9c76b96e7aff21696a40dacc09d0237bc (patch)
tree1b4253035fcbb699c4110f220609fc7f37e64ca0 /tools/clang-cc/clang-cc.cpp
parent9e8a72291465488e734c8aa5e20142d8b3cd981c (diff)
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(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72597 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-cc/clang-cc.cpp')
-rw-r--r--tools/clang-cc/clang-cc.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp
index 1503937afa..a0ccafa9af 100644
--- a/tools/clang-cc/clang-cc.cpp
+++ b/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: