[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-29 Thread Sacha Ballantyne via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe2b7424d0666: [Flang] Add debug flag to enable current debug information pass (authored by SBallantyne). Repository: rG LLVM Github Monorepo

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-29 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne updated this revision to Diff 509303. SBallantyne added a comment. Clang format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146814/new/ https://reviews.llvm.org/D146814 Files: clang/include/clang/Driver/Options.td

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-28 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.h:111 +llvm::codegenoptions::DebugInfoKind +DebugLevelToInfoKind(const llvm::opt::Arg ); + awarzynski wrote: > SBallantyne wrote: > > awarzynski wrote: > > > awarzynski wrote:

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-28 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne updated this revision to Diff 509029. SBallantyne added a comment. Update style to mach style guidelines Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146814/new/ https://reviews.llvm.org/D146814 Files:

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-28 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.h:111 +llvm::codegenoptions::DebugInfoKind +DebugLevelToInfoKind(const llvm::opt::Arg ); + SBallantyne wrote: > awarzynski wrote: > > awarzynski wrote: > > > CamelCase or

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-28 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne added a comment. Comment at: clang/lib/Driver/ToolChains/CommonArgs.h:111 +llvm::codegenoptions::DebugInfoKind +DebugLevelToInfoKind(const llvm::opt::Arg ); + awarzynski wrote: > awarzynski wrote: > > CamelCase or camelCase? ;-) > Sorry, I meant

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-28 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thanks for the explanation! Still looking good apart from the function names ;) Comment at: clang/lib/Driver/ToolChains/CommonArgs.h:111 +llvm::codegenoptions::DebugInfoKind +DebugLevelToInfoKind(const llvm::opt::Arg ); + awarzynski

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-28 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne updated this revision to Diff 508970. SBallantyne marked an inline comment as done. SBallantyne added a comment. Fix case issue. As for tests for debug information being generated, these are already covered by various tests in flang/tests/Transforms, namely debug-line-table.fir,

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-28 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. LGTM, thanks for working on this! (please fix the name in CommonArgs.h before landing this) It would be great to see a test that checks for debug info in the generated

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-28 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne updated this revision to Diff 508949. SBallantyne marked an inline comment as done. SBallantyne added a comment. Add common function addDebugKindInfo, update warning message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146814/new/

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-27 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thanks for the updates! A few more pointers, but nothing major. Btw, are there any tests that check for debug info in the compiled files? For example: ! RUN: flang -g1 -S %s | FileCheck -check-prefixes=DEBUG-INFO-PRESENT ! RUN: flang -g0 -S %s | FileCheck

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-27 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne added a comment. In D146814#4223967 , @awarzynski wrote: > What's the overall design goal here? 100% consistency with Clang? Could this > be documented? The goal of this patch is just to enable the current debug pass with an appropriate

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-27 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne updated this revision to Diff 508658. SBallantyne marked 5 inline comments as done. SBallantyne added a comment. Add test for invalid debug-info-kind and address other review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-27 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. What's the overall design goal here? 100% consistency with Clang? Could this be documented? Comment at: clang/include/clang/Driver/ToolChain.h:23 #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Triple.h" #include

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-27 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne updated this revision to Diff 508552. SBallantyne marked an inline comment as done. SBallantyne added a comment. Update tests to check for warning at higher debug levels, as well as amend warning message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-27 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne updated this revision to Diff 508543. SBallantyne marked an inline comment as done. SBallantyne added a comment. Herald added subscribers: Moerafaat, zero9178, bzcheeseman, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1,

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-27 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne updated this revision to Diff 508536. SBallantyne added a comment. Attempt 2 to add previous work as stacked patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146814/new/ https://reviews.llvm.org/D146814 Files:

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-24 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne updated this revision to Diff 508165. SBallantyne added a comment. Add depending on D142347 and update references to clang::codegenoptions to llvm::codegenoptions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-24 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thanks for submitting this! Please add tests for `-g` and all variants of `-gline-tables-only`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146814/new/ https://reviews.llvm.org/D146814

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-24 Thread Tom Eccles via Phabricator via cfe-commits
tblah added a comment. Thanks for adding this flang. Please could you add a test checking that the pass is actually run when the flag is given. For example, see the tests on this patch https://reviews.llvm.org/D146278 Comment at: flang/include/flang/Tools/CLOptions.inc:21

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-24 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added inline comments. Comment at: flang/include/flang/Frontend/CodeGenOptions.h:18 +#include "clang/Basic/DebugInfoOptions.h" #include "llvm/Support/CodeGen.h" The following patch might be useful to avoid adding the clang header. Could you

[PATCH] D146814: [Flang] Add debug flag to enable current debug information pass

2023-03-24 Thread Sacha Ballantyne via Phabricator via cfe-commits
SBallantyne created this revision. SBallantyne added reviewers: MaskRay, awarzynski, DavidTruby, kiranchandramohan, tblah. Herald added a reviewer: sscalpone. Herald added a subscriber: sunshaoce. Herald added projects: Flang, All. SBallantyne requested review of this revision. Herald added