I've used Clang to compile a function with debug information enabled. For Instruction
s there's the handy getDebugLoc()
, but there's no such thing for Function
s. Given a Function
instance, how can I get the debug information (I'm guessing in DISubProgram
form) for it?
I've seen the guide entry explaining how that debug information is represented, and the metadata does contain a link back to the function, but there's apparently no link back. Am I supposed to iterate over all the metadata in the module?