From 529f71811b0475995f2d9cf766f18d897eec574c Mon Sep 17 00:00:00 2001 From: Faris Rehman Date: Wed, 17 Feb 2021 18:53:05 +0000 Subject: [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 --- flang/lib/Frontend/CompilerInvocation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'flang/lib/Frontend/CompilerInvocation.cpp') 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: -- cgit v1.1