[all-commits] [llvm/llvm-project] 453e41: [flang] Lowering support for -gdwarf-N flag. (#159...

Abid Qadeer via All-commits all-commits at lists.llvm.org
Wed Sep 17 10:17:41 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 453e4102bd32b892e7fda2aea3f3ef9e9b038580
      https://github.com/llvm/llvm-project/commit/453e4102bd32b892e7fda2aea3f3ef9e9b038580
  Author: Abid Qadeer <haqadeer at amd.com>
  Date:   2025-09-17 (Wed, 17 Sep 2025)

  Changed paths:
    M flang/include/flang/Optimizer/Passes/Pipelines.h
    M flang/include/flang/Optimizer/Transforms/Passes.td
    M flang/include/flang/Tools/CrossToolHelpers.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Optimizer/Passes/Pipelines.cpp
    M flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
    A flang/test/Integration/debug-dwarf-flags.f90
    A flang/test/Transforms/debug-dwarf-version.fir

  Log Message:
  -----------
  [flang] Lowering support for -gdwarf-N flag. (#159137)

This PR builds on the https://github.com/llvm/llvm-project/pull/158314
and adds the lowering support for `-gdwarf-N` flag. The changes to pass
the information to `AddDebugInfo` pass are mostly mechanical. The
`AddDebugInfo` pass adds `ModuleFlagsOp` in the module which gets
translated to correct llvm metadata during mlir->llvmir translation.

There is minor correction where the version is set to 0 in case no
-debug-version flag is provided. Previously it was set to 2 in this case
due to misreading of clang code.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list