[Chapel Merge] Call setSubprogram on debug info for function when

Branch: refs/heads/master
Revision: d68e9e5
Author: daviditen
Log Message:

Merge pull request #16836 from daviditen/llvm-gdb-tests

Call setSubprogram on debug info for function when it is created

[reviewed by @mppf]

When doing codegen for a function with --lldb and -g, we were creating a
llvm::Subprogram unit for debug scope information, but never actually
assigning it to the function. Call setSubprogram with the debug scope
subprogram in order to pair it with the function.

Fixes execflags/bradc/gdbdash/declint and execflags/bradc/gdbdash/gdbSetConfig
with --llvm and --fast.

Signed-off-by: David Iten daviditen@users.noreply.github.com

Modified Files:
M compiler/codegen/symbol.cpp

Compare: https://github.com/chapel-lang/chapel/compare/ee9246ce0c02...d68e9e50d50b