aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorFaris Rehman <faris.rehman@arm.com>2021-02-17 15:55:56 +0000
committerFaris Rehman <faris.rehman@arm.com>2021-02-18 11:33:24 +0000
commit4bd08dab5ff99d094513f4adf4bf16bbce8f5a1f (patch)
tree2ab92aad7a33d55211ea4d38eccfbee589a5f30f /flang/lib/Frontend/CompilerInvocation.cpp
parent5a4a01460f1a8f29db9aa3581097dd8bc105425c (diff)
downloadllvm-4bd08dab5ff99d094513f4adf4bf16bbce8f5a1f.zip
llvm-4bd08dab5ff99d094513f4adf4bf16bbce8f5a1f.tar.gz
llvm-4bd08dab5ff99d094513f4adf4bf16bbce8f5a1f.tar.bz2
[flang][driver] Add debug dump options
Add the following options: * -fdebug-dump-symbols * -fdebug-dump-parse-tree * -fdebug-dump-provenance Summary of changes: - Add 3 new frontend actions: DebugDumpSymbolsAction, DebugDumpParseTreeAction and DebugDumpProvenanceAction - Add a unique pointer to the Semantics instance created in PrescanAndSemaAction - Move fatal semantic error reporting to its own method, FrontendActions#reportFatalSemanticErrors - Port most tests using `-fdebug-dump-symbols` and `-fdebug-dump-parse-tree` to the new driver if built, otherwise default to f18 Differential Revision: https://reviews.llvm.org/D96716
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index cd104d3..ecc0fda 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -116,6 +116,15 @@ static InputKind ParseFrontendArgs(FrontendOptions &opts,
case clang::driver::options::OPT_fdebug_unparse_with_symbols:
opts.programAction_ = DebugUnparseWithSymbols;
break;
+ case clang::driver::options::OPT_fdebug_dump_symbols:
+ opts.programAction_ = DebugDumpSymbols;
+ break;
+ case clang::driver::options::OPT_fdebug_dump_parse_tree:
+ opts.programAction_ = DebugDumpParseTree;
+ break;
+ case clang::driver::options::OPT_fdebug_dump_provenance:
+ opts.programAction_ = DebugDumpProvenance;
+ break;
// TODO:
// case calng::driver::options::OPT_emit_llvm: