From 4de035947bff2610db9d586937b763a8e70d70dd Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Tue, 31 Jul 2012 09:37:40 +0000 Subject: Added -ast-list option to dump filterable AST decl node names. llvm-svn: 161040 --- clang/lib/Frontend/CompilerInvocation.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index ea735ed..94a89f4 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -434,6 +434,7 @@ static const char *getActionName(frontend::ActionKind Kind) { case frontend::PluginAction: llvm_unreachable("Invalid kind!"); + case frontend::ASTDeclList: return "-ast-list"; case frontend::ASTDump: return "-ast-dump"; case frontend::ASTDumpXML: return "-ast-dump-xml"; case frontend::ASTPrint: return "-ast-print"; @@ -1438,6 +1439,8 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, switch (A->getOption().getID()) { default: llvm_unreachable("Invalid option in group!"); + case OPT_ast_list: + Opts.ProgramAction = frontend::ASTDeclList; break; case OPT_ast_dump: Opts.ProgramAction = frontend::ASTDump; break; case OPT_ast_dump_xml: -- cgit v1.1