[flang][driver] Add debug dump options
authorFaris Rehman <faris.rehman@arm.com>
Wed, 17 Feb 2021 15:55:56 +0000 (15:55 +0000)
committerFaris Rehman <faris.rehman@arm.com>
Thu, 18 Feb 2021 11:33:24 +0000 (11:33 +0000)
commit4bd08dab5ff99d094513f4adf4bf16bbce8f5a1f
tree2ab92aad7a33d55211ea4d38eccfbee589a5f30f
parent5a4a01460f1a8f29db9aa3581097dd8bc105425c
[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
16 files changed:
clang/include/clang/Driver/Options.td
flang/include/flang/Frontend/FrontendActions.h
flang/include/flang/Frontend/FrontendOptions.h
flang/lib/Frontend/CompilerInvocation.cpp
flang/lib/Frontend/FrontendActions.cpp
flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
flang/test/Flang-Driver/debug-provenance.f90 [new file with mode: 0644]
flang/test/Flang-Driver/driver-help.f90
flang/test/Semantics/data05.f90
flang/test/Semantics/data08.f90
flang/test/Semantics/data09.f90
flang/test/Semantics/offsets01.f90
flang/test/Semantics/offsets02.f90
flang/test/Semantics/offsets03.f90
flang/test/Semantics/resolve100.f90
flang/test/Semantics/rewrite01.f90