[Flang] Add debug flag to enable current debug information pass
authorSacha Ballantyne <Sacha.Ballantyne@arm.com>
Mon, 27 Mar 2023 13:12:10 +0000 (13:12 +0000)
committerSacha Ballantyne <Sacha.Ballantyne@arm.com>
Wed, 29 Mar 2023 12:21:26 +0000 (12:21 +0000)
commite2b7424d06663f92b958c0b4649ed08b55216a49
treecd3c6c6efe6befab936c78f3a246a88e2aa163cb
parent6b6f312ccedff8322e246f9022148a5bc8805ae5
[Flang] Add debug flag to enable current debug information pass

While a pass exists to generate basic debug information, currently there is not a corresponding flag to enable it.
This patch adds support for activating this pass at any debug level >= -g1, as well as emiting a warning for higher levels that the functionality is not yet fully implemented.

This patch also adds -g and -gline-tables-only to appear when `flang-new` --help is run

Depends on D142347.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D146814
13 files changed:
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/lib/Driver/ToolChains/CommonArgs.h
clang/lib/Driver/ToolChains/Flang.cpp
flang/include/flang/Frontend/CodeGenOptions.def
flang/include/flang/Frontend/CodeGenOptions.h
flang/include/flang/Tools/CLOptions.inc
flang/lib/Frontend/CompilerInvocation.cpp
flang/lib/Frontend/FrontendActions.cpp
flang/test/Driver/driver-help-hidden.f90
flang/test/Driver/driver-help.f90
flang/test/Driver/mlir-debug-pass-pipeline.f90 [new file with mode: 0644]