[flang-commits] [flang] [mlir] [MLIR][Flang][DebugInfo] Set debug info format in MLIR->IR translation (PR #95098)

Stephen Tozer via flang-commits flang-commits at lists.llvm.org
Tue Jun 11 10:57:26 PDT 2024


================
@@ -81,6 +82,8 @@ using namespace Fortran::frontend;
   llvm::PassPluginLibraryInfo get##Ext##PluginInfo();
 #include "llvm/Support/Extension.def"
 
+extern llvm::cl::opt<bool> WriteNewDbgInfoFormat;
----------------
SLTozer wrote:

> Interesting. IMHO, that should not be allowed - it means that the internals of LLVM leak higher up the compilation stack. Flang will complain if the compiler is invoked with an unrecognised flag (`-write-experimental-debuginf` would qualify as such). There's a bit of context at the bottom of my comment.

Ah, I think there's a terminology mismatch here - I do mean that the flag is being passed under `-llvm`, to an invocation of `-fc1`, and that affects the results of LLVM internal behaviour invoked by the frontend, which is what I'm going for here. The patch here seems to work, so this is probably the right way: https://github.com/llvm/llvm-project/pull/95142

https://github.com/llvm/llvm-project/pull/95098


More information about the flang-commits mailing list