aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorFaris Rehman <faris.rehman@arm.com>2021-02-17 18:53:05 +0000
committerFaris Rehman <faris.rehman@arm.com>2021-02-19 11:27:54 +0000
commit529f71811b0475995f2d9cf766f18d897eec574c (patch)
tree38a91175d41a58a35a1caffc1abae6fe8513d861 /flang/lib/Frontend/CompilerInvocation.cpp
parentaa44815f849f2928f998499b163c8c3230a73c95 (diff)
downloadllvm-529f71811b0475995f2d9cf766f18d897eec574c.zip
llvm-529f71811b0475995f2d9cf766f18d897eec574c.tar.gz
llvm-529f71811b0475995f2d9cf766f18d897eec574c.tar.bz2
[flang][driver] Add debug measure-parse-tree and pre-fir-tree options
Add the following options: * -fdebug-measure-parse-tree * -fdebug-pre-fir-tree Summary of changes: - Add 2 new frontend actions: DebugMeasureParseTreeAction and DebugPreFIRTreeAction - Add MeasurementVisitor to FrontendActions.h - Make reportFatalSemanticErrors return true if there are any fatal errors - Port most of the `-fdebug-pre-fir-tree` tests to use the new driver if built, otherwise use f18. Differential Revision: https://reviews.llvm.org/D96884
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index ecc0fda..822bf26 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -125,6 +125,12 @@ static InputKind ParseFrontendArgs(FrontendOptions &opts,
case clang::driver::options::OPT_fdebug_dump_provenance:
opts.programAction_ = DebugDumpProvenance;
break;
+ case clang::driver::options::OPT_fdebug_measure_parse_tree:
+ opts.programAction_ = DebugMeasureParseTree;
+ break;
+ case clang::driver::options::OPT_fdebug_pre_fir_tree:
+ opts.programAction_ = DebugPreFIRTree;
+ break;
// TODO:
// case calng::driver::options::OPT_emit_llvm: