I do not think this is easier now. Previously, there were global node metadata that collected all the metadata records of functions ( llvm.dbg.sp ), but they were deleted some time ago in favor of llvm.dbg.cu , which more closely reflect the DWARF structure.
I believe that the normal use of debug metadata does not require a function search, and any additional information that can be deleted has been deleted, because saving space is important and the metadata in IR is already too large.
source share