aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAndrzej Warzynski <andrzej.warzynski@arm.com>2021-06-15 15:30:23 +0000
committerAndrzej Warzynski <andrzej.warzynski@arm.com>2021-06-16 07:54:27 +0000
commita6be6e31f1810012922e50dab0d4c15cdf990d2e (patch)
treeaa0a59bbb4fd120d2a73fe3e6061a521116bfb87 /flang/lib/Frontend/CompilerInvocation.cpp
parentcff215565e9351511d805f72e62803718be6aaa4 (diff)
downloadllvm-a6be6e31f1810012922e50dab0d4c15cdf990d2e.zip
llvm-a6be6e31f1810012922e50dab0d4c15cdf990d2e.tar.gz
llvm-a6be6e31f1810012922e50dab0d4c15cdf990d2e.tar.bz2
[flang][driver] Add `-fdebug-dump-all`
The new option will run the semantic checks and then dump the parse tree and all the symbols. This is equivalent to running the driver twice, once with `-fdebug-dump-parse-tree` and then with the `-fdebug-dump-symbols` action flag. Currently we wouldn't be able to achieve the same by simply running: ``` flang-new -fc1 -fdebug-dump-parse-tree -fdebug-dump-symbols <input-file> ``` That's because the new driver will only run one frontend action per invocation (both of the flags used here are action flags). Diverging from this design would lead to costly compromises and it's best avoided. We may want to consider re-designing our debugging actions (and action options) in the future so that there's more code re-use. For now, I'm focusing on making sure that we support all the major cases requested by our users. Differential Revision: https://reviews.llvm.org/D104305
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 5098da4..dc771ec 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -141,6 +141,9 @@ static bool ParseFrontendArgs(FrontendOptions &opts, llvm::opt::ArgList &args,
case clang::driver::options::OPT_fdebug_dump_parse_tree:
opts.programAction_ = DebugDumpParseTree;
break;
+ case clang::driver::options::OPT_fdebug_dump_all:
+ opts.programAction_ = DebugDumpAll;
+ break;
case clang::driver::options::OPT_fdebug_dump_parse_tree_no_sema:
opts.programAction_ = DebugDumpParseTreeNoSema;
break;