[all-commits] [llvm/llvm-project] f156b9: [flang] Add debug information for module variables...

Abid Qadeer via All-commits all-commits at lists.llvm.org
Wed May 22 02:59:50 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f156b9ce7aae520046c926458ed17d73ed33fc2a
      https://github.com/llvm/llvm-project/commit/f156b9ce7aae520046c926458ed17d73ed33fc2a
  Author: Abid Qadeer <haqadeer at amd.com>
  Date:   2024-05-22 (Wed, 22 May 2024)

  Changed paths:
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
    A flang/test/Integration/debug-module-2.f90
    A flang/test/Transforms/debug-module-1.fir
    A flang/test/Transforms/debug-module-2.fir

  Log Message:
  -----------
  [flang] Add debug information for module variables. (#91582)

This PR add debug info for module variables. The module variables are
added as global variables but their scope is set to module instead of
compile unit. The scope of function declared inside a module is also set
accordingly.

After this patch, a module variable could be evaluated in the GDB as `p
helper::gli` where helper is name of the module and gli is the name of
the variable. A future patch will add the import module functionality
which will remove the need to prefix the name with helper::.

The line number where is module is declared is a best guess at the
moment as this information is not part of the GlobalOp.



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