aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/FrontendTool
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/FrontendTool
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/FrontendTool')
-rw-r--r--flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index ffc0d75..e53f652 100644
--- a/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
@@ -55,6 +55,9 @@ static std::unique_ptr<FrontendAction> CreateFrontendBaseAction(
case DebugDumpParseTreeNoSema:
return std::make_unique<DebugDumpParseTreeNoSemaAction>();
break;
+ case DebugDumpAll:
+ return std::make_unique<DebugDumpAllAction>();
+ break;
case DebugDumpProvenance:
return std::make_unique<DebugDumpProvenanceAction>();
break;