Debug Information for a function

Hi,

I am trying to determine the debug information corresponding to a function in IR. Previously, LLVM IR used to assign a name “llvm.dpg.sp” to all such metadata but this seems to have been discontinued since 3.0

I saw in an old thread suggesting the use of subprogram iterator in DebugInfoFinder, but that also relies on “llvm.dpg.sp” flag, which is no longer present. Is there a simple way to get to the debug information for a function.

Thanks

–Kapil