[flang][debug] Set scope of internal functions correctly. (#99531)
commit2a986c55d135d1da7268c73ede08789497b7f992
authorAbid Qadeer <haqadeer@amd.com>
Thu, 25 Jul 2024 12:52:50 +0000 (25 13:52 +0100)
committerTobias Hieta <tobias@hieta.se>
Fri, 26 Jul 2024 11:51:43 +0000 (26 13:51 +0200)
tree2394d45f6893ed750b5ae3de023abb1575d3d077
parent58f851dfb66dcd0af89d0e2da483a358c3643114
[flang][debug] Set scope of internal functions correctly. (#99531)

Summary:
The functions internal to subroutine should have the scope set to the
parent function. This allows a user to evaluate local variables of
parent function when control is stopped in the child.

Fixes #96314

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: https://phabricator.intern.facebook.com/D60250527

(cherry picked from commit 626022bfd18f335ef62a461992a05dfed4e6d715)
flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
flang/test/Transforms/debug-96314.fir [new file with mode: 0644]